mirror of https://github.com/deavmi/dlog.git
Core
- Updated documentation Context - Updated documentation Transform - Updated documentation
This commit is contained in:
parent
2a6c0b493f
commit
9b79e6f154
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
/**
|
||||
* Transformations
|
||||
*/
|
||||
module dlog.transform;
|
||||
|
||||
import dlog.context : Context;
|
||||
|
|
Loading…
Reference in New Issue