diamond.core.logging

Copyright © DiamondMVC 2019

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, string message)

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, string connectionString)

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)

Creates a file logger.

Static variables

_loggers
LogDelegate[][LogType] _loggers;

Collection of loggers.

Meta

Authors

Jacob Jensen (bausshf)