HTMLLogger

Logs messages to a .html file. When viewed in a browser, it provides an easily-searchable and filterable view of logged messages.

Constructors

this
this(string logpath, LogLevel lv, LogLevel defaultMinDisplayLevel)

Creates a new log file with the specified path and filename.

this
this(File file, LogLevel lv, LogLevel defaultMinDisplayLevel)

Writes a log file using an already-opened handle. Note that having pre-existing data in the file will likely cause display errors.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

writeLogMsg
void writeLogMsg(LogEntry payLoad)

Writes a log message. For internal use by std.experimental.logger.

Examples

auto logger = new HTMLLogger("test.html", LogLevel.trace);
logger.fatalHandler = () {};
foreach (i; 0..100) { //Log one hundred of each king of message
	logger.trace("Example - Trace");
	logger.info("Example - Info");
	logger.warning("Example - Warning");
	logger.error("Example - Error");
	logger.critical("Example - Critical");
	logger.fatal("Example - Fatal");
}

Meta