Divooka.Logging

Divooka.Logging.Logger

A logger that can simultanously write to file and standard output.

Divooka.Logging.Logger.#ctor()

Initializes the logger with a specified log file path and an option to also print log messages to the console.

Parameters

NameDescriptionDefault
logFilePath Path to the log file (e.g., "app.log").
printToConsole If true, log entries will also be printed to the console.

Divooka.Logging.Logger.LogInfo()

Writes a simple INFO-level message.

Divooka.Logging.Logger.LogWarning()

Writes a WARNING-level message.

Divooka.Logging.Logger.LogError()

Writes an ERROR-level message.

Divooka.Logging.Logger.Deserialize()

Reads the specified log file and deserializes the text lines into LogRecord objects.

Parameters

NameDescriptionDefault
filePath Path to the log file to parse.

Returns

An array of LogRecord entries found in the log file.

Divooka.Logging.Logger.Log()

Main logging method that all others delegate to. Writes a message at a given log level to the .log file, and optionally prints to the console. Format: [DateTime] [LEVEL] Message