Log

Undocumented in source.

Constructors

this
this(bool p_formattingEnabled)
Undocumented in source.
this
this(ubyte p_logLevel)
Undocumented in source.
this
this(File p_logFile, bool p_allowTTY, ubyte p_logLevel)
Undocumented in source.
this
this(string p_logFile, bool p_allowTTY, ubyte p_logLevel)
Undocumented in source.

Members

Functions

critical
void critical(S args)
error
void error(S args)
fatal
void fatal(S args)

This function logs args to stdout In order for the resulting log message to appear LogLevel must be greater or equal then globalLogLevel When using log!LogLevel.off or message it'll be displayed no matter the level of globalLogLevel

flush
void flush()

Flushes log file

info
void info(S args)
log
void log(S args)

This function logs args to stdout In order for the resulting log message to appear LogLevel must be greater or equal then globalLogLevel When using log!LogLevel.off or message it'll be displayed no matter the level of globalLogLevel

logFile
void logFile(File f)
void logFile(string filepath)

Sets or resets file for logging, supply unopened file or empty filepath to reset. If string path is supplies Log opens file in "W" mode (overwrites file contents)

logFile
const(File) logFile()

Returns log file

logRaw
void logRaw(S args)

Writes raw message to log

message
void message(S args)

This function logs args to stdout In order for the resulting log message to appear LogLevel must be greater or equal then globalLogLevel When using log!LogLevel.off or message it'll be displayed no matter the level of globalLogLevel

newline
void newline()

Creates new line (br)

trace
void trace(S args)
warning
void warning(S args)

This function logs args to stdout In order for the resulting log message to appear LogLevel must be greater or equal then globalLogLevel When using log!LogLevel.off or message it'll be displayed no matter the level of globalLogLevel

Variables

allowFile
bool allowFile;

Is File (logFile) allowed to be printed into

allowTTY
bool allowTTY;

Is TTY (terminal) allowed to be printed into

alwaysFlush
bool alwaysFlush;

Always flushes file after logging. might be slow, but will prevent data loss on crashes

formattingEnabled
bool formattingEnabled;

Is formatting (colors) enabled

logLevel
ubyte logLevel;

Log level (recommended to be set to LogLevel.warning on production)

simpleOutput
bool simpleOutput;

Should output in format: File(Line): Type: Message

Meta