colored-logger ~master

Colored logger for TTY


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:

Colored Logger

Color your log message.

This depends on std.experimental.logger.

Example

import coloredlogger;
import std.experimental.logger : LogLevel;
import std.stdio : stdout;

void main()
{
    auto logger = new ColoredLogger(stdout, LogLevel.all);

    logger.trace("trace");
    logger.info("info");
    logger.warning("warning");
    logger.error("error");
    logger.critical("critical");
    logger.fatal("fatal");
}

example

Change color

You can change color setting by passing string[LogLevel] object to 2nd argument.

new ColoredLogger(stdout, [LogLevel.info : ColoredLogger.Color.White], LogLevel.all);

Copyright (c) 2015- Masahiro Nakagawa

License

Distributed under the Boost Software License, Version 1.0.

Authors:
  • Masahiro Nakagawa
Dependencies:
none
Versions:
0.1.0 2015-Dec-15
~master 2015-Dec-15
Show all 2 versions
Download Stats:
  • 4 downloads today

  • 4 downloads this week

  • 4 downloads this month

  • 204 downloads total

Score:
0.5
Short URL:
colored-logger.dub.pm