colored-logger 0.1.0
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");
}
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
Copyright (c) 2015- Masahiro Nakagawa
License
Distributed under the Boost Software License, Version 1.0.
- 0.1.0 released 9 years ago
- repeatedly/colored-logger
- BSL-1.0
- Copyright © 2015, Masahiro Nakagawa
- Authors:
- Dependencies:
- none
- Versions:
-
0.1.0 2015-Dec-15 ~master 2015-Dec-15 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
4 downloads this month
-
204 downloads total
-
- Score:
- 0.5
- Short URL:
- colored-logger.dub.pm