gogga 3.2.0
Plug-and-play colorful VT100 logging for your terminal
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
<p align="center"> <img src="branding/logo_banner.png" width=450> </p>
<h3 align="center"><i><b>Simple VT100 colourised pretty-printing logger</i></b></h3>
<br
Usage
The API is rather straight-forward, simply create a new logger and then you can use it as such:
import gogga;
GoggaLogger gLogger = new GoggaLogger();
gLogger.info("This is an info message");
gLogger.warn("This is a warning message");
gLogger.error("This is an error message");
This should output something like the following:
Various styles are supported which can be set using mode(GoggaMode)
.
Or you can also View the full API.
Quick-and-dirty logging functions
For quick-and-dirty ease of use there is also a module called gogga.mixins
. Once
this module is imported it will mixin a set of variadic-argument functions for you
of the form:
DEBUG(...)
INFO(...)
WARN(...)
ERROR(...)
These will become immediately available to you and a logger that is configured to
write out to standard output will be configured with the styling of GoggaMode.SIMPLE
and a logging level of Level.INFO
.
As for build options there are the following available for configuration:
Build option name | Description |
---|---|
DBG_VERBOSE_LOGGING | When enabled the GoggaMode.RUSTACEAN will be used |
DBG_DEBUG_LOGGING | When enabled the logging level will be set to Level.DEBUG |
The GoggaLogger
logger instance created is shared amongst the same thread or
in other words it is stored as part of thread-local storage (TLS). For more information
browse the source code of source/gogga/mixins.d
.
- Registered by Tristan B. Velloza Kildaire
- 3.2.0 released 10 days ago
- deavmi/gogga
- deavmi.assigned.network/projects/
- LGPL 3.0
- Copyright © 2023, Tristan B. Kildaire
- Authors:
- Dependencies:
- dlog
- Versions:
-
3.2.0 2025-Mar-21 3.1.3 2025-Mar-21 3.1.2 2025-Mar-21 3.1.1 2024-Apr-11 3.1.0 2024-Apr-11 - Download Stats:
-
-
8 downloads today
-
43 downloads this week
-
56 downloads this month
-
4855 downloads total
-
- Score:
- 1.5
- Short URL:
- gogga.dub.pm