logToDatabase

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)

static if(loggingEnabled)
void
logToDatabase
(,
string table
,
void delegate callback = null
,
string connectionString = null
)

Parameters

logType LogType

The type of the logger.

table string

The table to log entries to.

callback void delegate

An optional callback after the log has been written.

connectionString string

A connection string to associate with the logging. If none is specified then it will use the default connection string.

Meta