onyx-log 1.2.1-rc3

Log library by D

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



onyx-log: the simple, fast, multithreading logging library for D.

Key features:

  • Create loggers in "logger pool" with configuration data packed to ConfBundle (onyx-config lib).
  • Get logger by his name.
  • Write message to logger.
  • Any work with loggers in multi-threaded environment is safety.


Configuration text file ("./test/test.conf"):

# Logger's name. Any string value

# Message level accepted by logger
# Values by priority from low to high: debug, info, warning, error, critical, fatal
level = debug			

# Appender is logger's message writer
# Values: NullAppender, ConsoleAppender, FileAppender
appender = FileAppender

# Rolling type
# Values: SizeBasedRollover
rolling = SizeBasedRollover

# Log file max size
# Values: number, number with suffix: K, M, G, T, P
maxSize = 2K

# Max number of log files
# Values: number
maxHistory = 4

# For FileAppender need path to log file and base of file name
fileNameBase = ./log/MainDebug.log

level = error
appender = ConsoleAppender

Source code example:

import onyx.log;
import onyx.config.bundle;

void main()
	/* Build ConfBundle from config file */
	auto bundle = immutable ConfBundle("./test/test.conf");

	/* Add loggers to "logger pool" */

	/* Get logger from "logger pool" */
	auto log = getLogger("ErrorLogger");

	/* send message to logger */
	log.error("error msg");

	auto logDebug = getLogger("DebugLogger");
	logDebug.debug_("debug msg");
	logDebug.info("info msg");
	logDebug.error("error!!!!!! msg");

Authors:Oleg Nykytenko


1.2.1-rc3 2016-Aug-10
1.2.1-rc2 2016-Jun-22
1.2.1-rc1 2016-Jun-03
1.2.0-beta.1 2015-Nov-03
1.1.0-beta.7 2015-Oct-06
Show all 14 versions

statistics are temporarily disabled.