log4d 1.0.3

Log for DLang


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:

<div align=center>

</div>

Log4D

A simple logger for DLang.

Start

Create a logger:

import log4d : Logger;

// Create a logger.
auto LOGGER;

// Create a logger without debug.
auto LOGGER_WITHOUT_DEBUG;

void main(string[] args)
{
    LOGGER = new Logger("MyLogger");
    LOGGER_WITHOUT_DEBUG = new Logger("MyLoggerOutDebug", false);
}

record:

auto log = new Logger("MyLogger");

log.info("My Info");
log.info("Auto %s", "format");

log.warn("A warn");
log.error("An error");

log.debugInfo("A debug info"); // Debug only.

try
{
    throw new Exception("Some reason...");
}
catch(Exception e)
{
    log.error(e); // Record an exception.
}
Authors:
  • AmarokIce
Dependencies:
none
Versions:
1.0.3 2024-Nov-01
1.0.2 2024-Sep-13
~main 2024-Nov-01
Show all 3 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 4 downloads this month

  • 4 downloads total

Score:
0.4
Short URL:
log4d.dub.pm