DatabaseWriter

class \TYPO3\CMS\Core\Log\Writer\DatabaseWriter

Extends
AbstractWriter

Log writer that writes the log records into a database table.

Table of Contents

Properties

$logTable  : string
Table to write the log records to.

Methods

__construct()  : mixed
Constructs this log writer
__wakeup()  : mixed
Deny object deserialization.
getLogTable()  : string
Get name of database log table
setLogTable()  : AbstractWriter
Set name of database log table
writeLog()  : WriterInterface
Writes the log record
formatContextValue()  : string
Escape or quote a value from the context appropriate for the output.
formatException()  : string
Formats an exception into a string.
interpolate()  : string
Interpolates context values into the message placeholders.

Properties

$logTable

Table to write the log records to.

protected string $logTable = 'sys_log'

Methods

__construct()

Constructs this log writer

public __construct([array $options = [] ]) : mixed

Parameters

$options : array = []

Configuration options - depends on the actual log writer

Tags

throws
InvalidLogWriterConfigurationException

__wakeup()

Deny object deserialization.

public __wakeup() : mixed

getLogTable()

Get name of database log table

public getLogTable() : string

Return values

string —

Database table name

formatContextValue()

Escape or quote a value from the context appropriate for the output.

protected formatContextValue(string $value) : string

Note: In some output cases, escaping should not be done here but later on output, such as if it's being written to a database for later display.

Parameters

$value : string

Return values

string

formatException()

Formats an exception into a string.

protected formatException(Throwable $ex) : string

The format here is nearly the same as just casting an exception to a string, but omits the full class namespace and stack trace, as those get very long.

Parameters

$ex : Throwable

Return values

string

interpolate()

Interpolates context values into the message placeholders.

protected interpolate(string $message[, array $context = [] ]) : string

Parameters

$message : string
$context : array = []

Return values

string
On this page