add aliases

This commit is contained in:
Alexander Zhirov 2023-03-29 17:56:33 +03:00
parent 7b6d13d9dc
commit b6e3306ca8
3 changed files with 15 additions and 1 deletions

View File

@ -1,5 +1,11 @@
# Changelog
## [v0.2.1](https://git.zhirov.kz/dlang/singlog/compare/v0.2.0...v0.2.1) (2023.03.29)
### New
- Added aliases for the short form of function calls
## [v0.2.0](https://git.zhirov.kz/dlang/singlog/compare/v0.1.0...v0.2.0) (2023.03.29)
- Removed functions `fileOn()` and `fileOff()`

View File

@ -59,7 +59,7 @@ log.critical("Critical message");
log.error("Error message");
log.warning("Warning message");
log.notice("Notice message");
log.informations("Information message");
log.information("Information message");
log.debugging("Debugging message");
```

View File

@ -148,4 +148,12 @@ class Log
void notice(T)(T message) { writeLog(message.to!string, NOTICE, LOG_NOTICE); }
void information(T)(T message) { writeLog(message.to!string, INFO, LOG_INFO); }
void debugging(T)(T message) {writeLog(message.to!string, DEBUG, LOG_DEBUG); }
alias a = alert();
alias c = critical();
alias e = error();
alias w = warning();
alias n = notice();
alias i = information();
alias d = debugging();
}