Logger

Members

Functions

console
void console(string message)

Log a debug message. Only works in debug mode. It starts with the current time + " -> LOG_DEBUG: "

error
void error(string message)

Log an error message. It starts with the current time + " -> LOG_ERROR: "

exception
void exception(string message)

Log an exception message. It starts with the current time + " -> LOG_EXCEPTION: "

info
void info(string message)

Log an information message. It starts with the current time + " -> LOG_INFO: "

isServiceRunning
bool isServiceRunning()

Returns true if Logger service is running.

restartService
void restartService()

Restart Logger service.

startService
void startService()

Start Logger service.

stopService
void stopService()

Stop Logger service.

todo
void todo(string message)

Log a todo message. It starts with the current time + " -> LOG_TODO: "

warning
void warning(string message)

Log a warning message. It starts with the current time + " -> LOG_WARNING: "

Inherited Members

From IService

startService
void startService()

Strat service.

stopService
void stopService()

Strat service.

restartService
void restartService()

Strat service.

isServiceRunning
bool isServiceRunning()

Strat service.

Examples

Logger.startService();
scope (exit) Logger.stopService();
Logger.console("Test message!");
Logger.info("Info test message!");
Logger.warning("Warning test message!");
Logger.error("Error test message!");
try {
    immutable int x = 5;
    if (x == 5) {
        throw new Exception("x cannot be 5!");
    }
} catch (Exception e) {
    Logger.exception("Exception test message!");
}
Logger.todo("Todo test message!");

Meta