From 9b79e6f1548bfe16cc4b63f42f0a3699d2e77d41 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Fri, 3 Mar 2023 15:21:16 +0200 Subject: [PATCH] Core - Updated documentation Context - Updated documentation Transform - Updated documentation --- source/dlog/context.d | 34 +++++++++++++++++++++++++++++++++- source/dlog/core.d | 8 +++----- source/dlog/transform.d | 3 +++ 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/source/dlog/context.d b/source/dlog/context.d index fe75384..d267be1 100644 --- a/source/dlog/context.d +++ b/source/dlog/context.d @@ -1,8 +1,14 @@ +/** + * Context for logging + */ + module dlog.context; import std.conv : to; - +/** + * Debugging trace level + */ public enum Level { INFO, @@ -19,26 +25,52 @@ public class Context private CompilationInfo lineInfo; private Level level; + /** + * Constructs a new Context + */ this() { } + /** + * Set the line information + * + * Params: + * lineInfo = the CompilationInfo struct to use + */ public final void setLineInfo(CompilationInfo lineInfo) { this.lineInfo = lineInfo; } + /** + * Obtain the line information generated at compilation + * time + * + * Returns: the CompilationInfo struct + */ public final CompilationInfo getLineInfo() { return lineInfo; } + /** + * Returns the current tarce level + * + * Returns: the Level + */ public final Level getLevel() { return level; } + /** + * Set the trace level + * + * Params: + * level = the Level to use + */ public final void setLevel(Level level) { this.level = level; diff --git a/source/dlog/core.d b/source/dlog/core.d index 633d6cf..3f1a8d6 100644 --- a/source/dlog/core.d +++ b/source/dlog/core.d @@ -1,8 +1,6 @@ -/** -* Core module containing types pertaining to the base Logger -* class and base MessageTransform class (along with a default -* transform, DefaultTransform) -*/ +/** + * Core logging services + */ module dlog.core; import std.conv : to; diff --git a/source/dlog/transform.d b/source/dlog/transform.d index 5efdc1b..3e24c62 100644 --- a/source/dlog/transform.d +++ b/source/dlog/transform.d @@ -1,3 +1,6 @@ +/** + * Transformations + */ module dlog.transform; import dlog.context : Context;