mirror of
https://github.com/deavmi/nostril
synced 2024-09-20 07:22:59 +02:00
Logging
- Upgraded to `gogga` `v2.1.2` - Don't include the `gogga` module import as part of the mixin - Set the mode of gogga ro `GoggaMode.TwoKTwenty3`
This commit is contained in:
parent
6eb4c35537
commit
8e9f060eb5
2
dub.json
2
dub.json
@ -4,7 +4,7 @@
|
|||||||
],
|
],
|
||||||
"copyright": "Copyright © 2023, Tristan B. Velloza Kildaire",
|
"copyright": "Copyright © 2023, Tristan B. Velloza Kildaire",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"gogga": "2.1.1",
|
"gogga": "2.1.2",
|
||||||
"vibe-d": "~>0.9.5"
|
"vibe-d": "~>0.9.5"
|
||||||
},
|
},
|
||||||
"description": "A minimal D application.",
|
"description": "A minimal D application.",
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
module nostril.logging;
|
module nostril.logging;
|
||||||
|
|
||||||
|
import gogga;
|
||||||
|
|
||||||
// NOTE: If we include threads then use `__gshared` so we have
|
// NOTE: If we include threads then use `__gshared` so we have
|
||||||
// ... one logger for the whole threadgroup and not a per-TLS
|
// ... one logger for the whole threadgroup and not a per-TLS
|
||||||
// ... (per-thread) logger (as we do below)
|
// ... (per-thread) logger (as we do below)
|
||||||
private mixin template LoggerSetup()
|
private mixin template LoggerSetup()
|
||||||
{
|
{
|
||||||
import gogga;
|
|
||||||
GoggaLogger logger;
|
GoggaLogger logger;
|
||||||
static this()
|
static this()
|
||||||
{
|
{
|
||||||
@ -15,6 +16,8 @@ private mixin template LoggerSetup()
|
|||||||
{
|
{
|
||||||
logger.enableDebug();
|
logger.enableDebug();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.mode(GoggaMode.TwoKTwenty3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user