diamond.core.logging

Copyright © DiamondMVC 2018

Members

Classes

LogResult
class LogResult

Wrapper around a log result.

Enums

LogType
enum LogType

Enumeration of log types.

Functions

executeLog
void executeLog(LogType logType, HttpClient client, lazy string message = null)

Executes a specific type of logger.

log
void log(LogType logType, void delegate(LogResult) logger)

Creates a logger.

logToDatabase
void logToDatabase(LogType logType, string table, void delegate(LogResult) callback = null, string connectionString = null)

Creates a database logger. The table must implement the following columns: logToken (VARCHAR) logType (ENUM ("error", "notFound", "after", "before", "staticFile")) applicationName (VARCHAR) authToken (VARCHAR) requestIPAddress (VARCHAR) requestMethod (VARCHAR) requestHeaders (TEXT) requestBody (TEXT) requestUrl (VARCHAR) responseHeaders (TEXT) responseBody (TEXT) responseStatusCode (INT) message (TEXT) timestamp (DATETIME)

logToFile
void logToFile(LogType logType, string file, void delegate(LogResult) callback = null)

Creates a file logger.

Static variables

_loggers
LogDelegate[][LogType] _loggers;

Collection of loggers.

Meta

Authors

Jacob Jensen (bausshf)