module battery.util.log
Somewhat simple logging core.
Code Map
//! Somewhat simple logging core.
module battery.util.log;
alias Sink = void delegate(scope (watt.SinkArg));
//! Super simple logger.
struct Logger
{
public:
fn info(str: scope (watt.SinkArg)) { }
}
//! Opens a new OutputFileStream for logging and sets it as the active
//! logging file.
fn newLog(filename: string) { }
//! Set the active logging file.
fn setLog(stream: watt.OutputStream) { }
struct Logger
Super simple logger.
Usage:
import battery.util.log : Logger;
private global log: Logger = {"my.prefix"};
fn newLog(filename: string)
Opens a new OutputFileStream for logging and sets it as the active logging file.
fn setLog(stream: watt.OutputStream)
Set the active logging file.