From b6e3306ca813574c0b004e72d4c3db8dd1415fcf Mon Sep 17 00:00:00 2001 From: Alexander Zhirov Date: Wed, 29 Mar 2023 17:56:33 +0300 Subject: [PATCH] add aliases --- CHANGELOG.md | 6 ++++++ README.md | 2 +- source/singlog.d | 8 ++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06c2744..41d680d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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()` diff --git a/README.md b/README.md index dedb456..1b05e5f 100644 --- a/README.md +++ b/README.md @@ -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"); ``` diff --git a/source/singlog.d b/source/singlog.d index df38390..71a8ff4 100644 --- a/source/singlog.d +++ b/source/singlog.d @@ -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(); }