Logs a critical error
Logs an non-critical error
Logs a fatal error and raises an Error to halt execution by crashing the application
Logs an informational message
Logs a trace/debug message
Logs a warning
Logs an exception (including a stack trace)
Sets the LogLevel of the default logger (also known as sharedLog)
// set the log level of `sharedLog` to *INFO* // (`sharedLog` is the globally available default logger implemented in `std.logger`) setLogLevel(LogLevel.info); logTrace("Trace/debug message"); logInfo("Info message"); logWarning("Warning message"); logError("(Non-fatal, uncritical) error message"); logCritical("(Non-fatal yet critical) error message"); logFatalAndCrash("Fatal error message, also crashes the program");
Logging
While D standard library’s std.logger “implements logging facilities” (At the time of writing, this is its actual module description.), this modules makes sense of them.