colorlog 0.0.1

std.experimental.logger with color support


To use this package, run the following command in your project's root directory:

colorlog

colorlog is a logger implementation of the interface for std.experimental.logger that supports coloring the messages.

Usage

The simples way to use colorlog is to call the config function. It takes care of creating a shared logger instance and registering it.

import colorlog;
// set the loglevel to info and register a SimpleLogger.
confLogger(VerboseMode.info);

Messages from logger will now have there loglevel colored. If additional coloring is desired the message can be manually colored.

logger.info("foo", "my message".color(Color.green).bg(Background.cyan).mode(Mode.bold));

Credit

Credit goes to the developers of dub. A significant part of the color handling is copied from that project.

Credit also goes to the developer of colorize for the inspiration.

Authors:
  • Joakim Braennstroem
Dependencies:
none
Versions:
0.0.2 2018-Aug-10
0.0.1 2018-Jul-23
~master 2019-Aug-08
Show all 3 versions
Download Stats:
  • 0 downloads today

  • 1 downloads this week

  • 1 downloads this month

  • 35 downloads total

Score:
0.3
Short URL:
colorlog.dub.pm