From dac231866eaad4a47ba740c9429bb4282ea53f05 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Wed, 10 Apr 2024 13:52:37 +0200 Subject: [PATCH] BasicLogger - Documented --- source/dlog/basic.d | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/source/dlog/basic.d b/source/dlog/basic.d index 88ceb2f..ed7753f 100644 --- a/source/dlog/basic.d +++ b/source/dlog/basic.d @@ -217,10 +217,20 @@ private class LevelFilter : Filter } } +/** + * A basic logger which has support + * for log levels + */ public class BasicLogger : Logger { + /** + * The current log level + */ private Level level; + /** + * Constructs a new `BasicLogger` + */ this() { // Attach a new level-filter @@ -229,11 +239,24 @@ public class BasicLogger : Logger addFilter(new LevelFilter(&level)); } + /** + * Sets the log level + * + * Params: + * level = the new + * level + */ public final void setLevel(Level level) { this.level = level; } + /** + * Obtains the current log + * level + * + * Returns: the current level + */ public final Level getLevel() { return this.level;