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;
|
module dlog.context;
|
||||||
|
|
||||||
import std.conv : to;
|
import std.conv : to;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Debugging trace level
|
||||||
|
*/
|
||||||
public enum Level
|
public enum Level
|
||||||
{
|
{
|
||||||
INFO,
|
INFO,
|
||||||
|
@ -19,26 +25,52 @@ public class Context
|
||||||
private CompilationInfo lineInfo;
|
private CompilationInfo lineInfo;
|
||||||
private Level level;
|
private Level level;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a new Context
|
||||||
|
*/
|
||||||
this()
|
this()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the line information
|
||||||
|
*
|
||||||
|
* Params:
|
||||||
|
* lineInfo = the CompilationInfo struct to use
|
||||||
|
*/
|
||||||
public final void setLineInfo(CompilationInfo lineInfo)
|
public final void setLineInfo(CompilationInfo lineInfo)
|
||||||
{
|
{
|
||||||
this.lineInfo = lineInfo;
|
this.lineInfo = lineInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtain the line information generated at compilation
|
||||||
|
* time
|
||||||
|
*
|
||||||
|
* Returns: the CompilationInfo struct
|
||||||
|
*/
|
||||||
public final CompilationInfo getLineInfo()
|
public final CompilationInfo getLineInfo()
|
||||||
{
|
{
|
||||||
return lineInfo;
|
return lineInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the current tarce level
|
||||||
|
*
|
||||||
|
* Returns: the Level
|
||||||
|
*/
|
||||||
public final Level getLevel()
|
public final Level getLevel()
|
||||||
{
|
{
|
||||||
return level;
|
return level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the trace level
|
||||||
|
*
|
||||||
|
* Params:
|
||||||
|
* level = the Level to use
|
||||||
|
*/
|
||||||
public final void setLevel(Level level)
|
public final void setLevel(Level level)
|
||||||
{
|
{
|
||||||
this.level = level;
|
this.level = level;
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Core module containing types pertaining to the base Logger
|
* Core logging services
|
||||||
* class and base MessageTransform class (along with a default
|
*/
|
||||||
* transform, DefaultTransform)
|
|
||||||
*/
|
|
||||||
module dlog.core;
|
module dlog.core;
|
||||||
|
|
||||||
import std.conv : to;
|
import std.conv : to;
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
/**
|
||||||
|
* Transformations
|
||||||
|
*/
|
||||||
module dlog.transform;
|
module dlog.transform;
|
||||||
|
|
||||||
import dlog.context : Context;
|
import dlog.context : Context;
|
||||||
|
|
Loading…
Reference in New Issue