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

D

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:

  1. DEBUG(...)
  2. INFO(...)
  3. WARN(...)
  4. 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 nameDescription
DBG_VERBOSE_LOGGINGWhen enabled the GoggaMode.RUSTACEAN will be used
DBG_DEBUG_LOGGINGWhen 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.

Authors:
  • Tristan B. Velloza Kildaire
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
Show all 53 versions
Download Stats:
  • 8 downloads today

  • 43 downloads this week

  • 56 downloads this month

  • 4855 downloads total

Score:
1.5
Short URL:
gogga.dub.pm