From 06784491cdde7226f15c754fd691909af8e61df2 Mon Sep 17 00:00:00 2001 From: Alexander Zhirov Date: Tue, 30 May 2023 19:32:09 +0300 Subject: [PATCH] Log of debug messages --- CHANGELOG.md | 6 ++++++ README.md | 2 +- source/singlog.d | 12 ++++++------ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6bd7b0..2ba884f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index a1ac6cc..8d57452 100644 --- a/README.md +++ b/README.md @@ -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"`. diff --git a/source/singlog.d b/source/singlog.d index 20aa256..30976db 100644 --- a/source/singlog.d +++ b/source/singlog.d @@ -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;