mirror of https://github.com/deavmi/gogga.git
parent
e3b27f6504
commit
14b732bf61
|
@ -1,10 +1,13 @@
|
||||||
|
/**
|
||||||
|
* Core routines and types
|
||||||
|
*
|
||||||
|
* Authors: Tristan Brice Velloza Kildaire (deavmi)
|
||||||
|
*/
|
||||||
module gogga.core;
|
module gogga.core;
|
||||||
|
|
||||||
import dlog.core;
|
import dlog.core;
|
||||||
import dlog.basic;
|
import dlog.basic;
|
||||||
|
|
||||||
import std.conv : to;
|
import std.conv : to;
|
||||||
|
|
||||||
import dlog.utilities : flatten;
|
import dlog.utilities : flatten;
|
||||||
import std.array : join;
|
import std.array : join;
|
||||||
|
|
||||||
|
@ -102,26 +105,44 @@ private struct GoggaCompInfo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A `GoggaMessage` which comprises
|
||||||
|
* of a `GoggaCompInfo` for context
|
||||||
|
*/
|
||||||
private class GoggaMessage : BasicMessage
|
private class GoggaMessage : BasicMessage
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* The line information
|
||||||
|
*/
|
||||||
private GoggaCompInfo ctx;
|
private GoggaCompInfo ctx;
|
||||||
|
|
||||||
this()
|
/**
|
||||||
{
|
* Sets the context
|
||||||
|
*
|
||||||
}
|
* Params:
|
||||||
|
* ctx = the context
|
||||||
|
*/
|
||||||
public void setContext(GoggaCompInfo ctx)
|
public void setContext(GoggaCompInfo ctx)
|
||||||
{
|
{
|
||||||
this.ctx = ctx;
|
this.ctx = ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the context
|
||||||
|
*
|
||||||
|
* Returns: the context
|
||||||
|
*/
|
||||||
public GoggaCompInfo getContext()
|
public GoggaCompInfo getContext()
|
||||||
{
|
{
|
||||||
return this.ctx;
|
return this.ctx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Gogga transformer which
|
||||||
|
* applies stylization to
|
||||||
|
* incoming `GoggaMessage`(s)
|
||||||
|
*/
|
||||||
private class GoggaTransform : Transform
|
private class GoggaTransform : Transform
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -223,8 +244,14 @@ private class GoggaTransform : Transform
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A `GoggaLogger`
|
||||||
|
*/
|
||||||
public final class GoggaLogger : BasicLogger
|
public final class GoggaLogger : BasicLogger
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* The Gogga text transformer
|
||||||
|
*/
|
||||||
private GoggaTransform gogTrans;
|
private GoggaTransform gogTrans;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -232,6 +259,9 @@ public final class GoggaLogger : BasicLogger
|
||||||
*/
|
*/
|
||||||
private bool debugEnabled = false;
|
private bool debugEnabled = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a new `GoggaLogger`
|
||||||
|
*/
|
||||||
this()
|
this()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
/**
|
/**
|
||||||
* Gogga logging facilities
|
* Gogga logging facilities
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* The Gogga logging library
|
||||||
|
*
|
||||||
|
* Authors: Tristan Brice Velloza Kildaire (deavmi)
|
||||||
|
*/
|
||||||
module gogga;
|
module gogga;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The logging class which provides the logging print
|
* Core routines and types
|
||||||
* calls, controlling of style and whether to debug or
|
|
||||||
* not
|
|
||||||
*/
|
*/
|
||||||
// public import gogga.core : GoggaLogger;
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * The gogga styles supported
|
|
||||||
// */
|
|
||||||
// public import gogga.transform
|
|
||||||
public import gogga.core;
|
public import gogga.core;
|
Loading…
Reference in New Issue