Log of debug messages
This commit is contained in:
parent
c8e73f989c
commit
f87ecc6d7e
|
@ -1,5 +1,11 @@
|
|||
# Changelog
|
||||
|
||||
## [v0.3.1](https://git.zhirov.kz/dlang/singlog/compare/v0.3.0...v0.3.1) (2023.05.30)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- Log of debug messages
|
||||
|
||||
## [v0.3.0](https://git.zhirov.kz/dlang/singlog/compare/v0.2.1...v0.3.0) (2023.04.28)
|
||||
|
||||
- Minor changes
|
||||
|
|
|
@ -75,4 +75,4 @@ log.d("Debugging message") => log.debugging("Debugging message");
|
|||
|
||||
## DUB
|
||||
|
||||
Add a dependency on `"singlog": "~>0.3.0"`.
|
||||
Add a dependency on `"singlog": "~>0.3.1"`.
|
||||
|
|
|
@ -21,13 +21,13 @@ alias log = Log.msg;
|
|||
// Setting the name of the logged program
|
||||
log.name("My program");
|
||||
// Setting the error output level
|
||||
log.level(log.DEBUG);
|
||||
log.level(log.DEBUGGING);
|
||||
log.level(log.ALERT);
|
||||
log.level(log.CRIT);
|
||||
log.level(log.ERR);
|
||||
log.level(log.CRITICAL);
|
||||
log.level(log.ERROR);
|
||||
log.level(log.WARNING);
|
||||
log.level(log.NOTICE);
|
||||
log.level(log.INFO);
|
||||
log.level(log.INFORMATION);
|
||||
// Assigning a target output
|
||||
log.output(log.SYSLOG);
|
||||
log.output(log.STDOUT);
|
||||
|
@ -35,13 +35,13 @@ alias log = Log.msg;
|
|||
// Setup and allowing writing to a file
|
||||
log.file("./file.log");
|
||||
// Output of messages to the log
|
||||
log.debugging("Debugging message");
|
||||
log.alert("Alert message");
|
||||
log.critical("Critical message");
|
||||
log.error("Error message");
|
||||
log.warning("Warning message");
|
||||
log.notice("Notice message");
|
||||
log.informations("Information message");
|
||||
log.debugging("Debugging message");
|
||||
---
|
||||
+/
|
||||
class Log {
|
||||
|
@ -179,7 +179,7 @@ public:
|
|||
void warning(T)(T message) { writeLog(message.to!string, WARNING); }
|
||||
void notice(T)(T message) { writeLog(message.to!string, NOTICE); }
|
||||
void information(T)(T message) { writeLog(message.to!string, INFORMATION); }
|
||||
void debugging(T)(T message) { writeLog(message.to!string, DEBUG); }
|
||||
void debugging(T)(T message) { writeLog(message.to!string, DEBUGGING); }
|
||||
|
||||
alias a = alert;
|
||||
alias c = critical;
|
||||
|
|
Loading…
Reference in New Issue