Description

A lightweight D logger that writes to a html for formatted output

Package Information

Version0.3.1 (2016-Sep-03)
Repository https://github.com/Amaranthos/logd-html
LicenseMIT
CopyrightCopyright © 2016, Joshua Hodkinson
AuthorsPatrick Monaghan, Joshua Hodkinson
Registered byJoshua Hodkinson
Dependencies none

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

logd-html Build Status Coverage Status Dub version

logd-html is a lightweight logger which writes to a html file; this allows formatted output and the potential for controls to review specific events, etc. Based on logger originally written by Patrick Monaghan

How to use

Install using dub

dub fetch logd-html

General usage

import logd.log;

void main() {
	EnableLogging(true);

	// By default will log to file "log.html"
	SetLogFilename("sampleLog.html");

	// Write newline
	Log();

	// Write to log, valid levels are:
	//	success
	//	event
	//	warning
	//	error
	//	update
	//	user
	Log(Level.event, "Hello world");

	// Log with header tag
	LogTag(Level.user, "h1", "This is a header");	
}

Todo

  • Define config file to customize formatted output (not sure about this, could lead to a bulkier system than I would like)
  • Add some js to interact with log file (e.g. hide particular levels, highlight keywords, etc)
  • Validate allowable tags for LogTag

Available versions

0.3.1 0.3.0 0.2.1 0.2.0 0.1.0 ~master