DatabaseLogger

Extends \Joomla\CMS\Log\Logger

Joomla! MySQL Database Log class

This class is designed to output logs to a specific MySQL database table. Fields in this table are based on the Syslog style of log output. This is designed to allow quick and easy searching.

since

1.7.0

Methods

__construct

Constructor.

__construct(array &$options) 
inherited
since

3.0.1

Arguments

$options

array

addEntry

Method to add an entry to the log.

addEntry(\Joomla\CMS\Log\LogEntry $entry) : void
inherited abstract
since

3.0.1

throws

\RuntimeException

Arguments

$entry

\Joomla\CMS\Log\LogEntryThe log entry object to add to the log.

connect

Method to connect to the database server based on object properties.

connect() : void
since

1.7.0

throws

\RuntimeException

Properties

driver

The name of the database driver to use for connecting to the database.

since

1.7.0

Type(s)

string

host

The host name (or IP) of the server with which to connect for the logger.

since

1.7.0

Type(s)

string

user

The database server user to connect as for the logger.

since

1.7.0

Type(s)

string

password

The password to use for connecting to the database server.

since

1.7.0

Type(s)

string

database

The name of the database table to use for the logger.

since

1.7.0

Type(s)

string

table

The database table to use for logging entries.

since

1.7.0

Type(s)

string

db

The database driver object for the logger.

since

1.7.0

Type(s)

\JDatabaseDriver

options

Options array for the JLog instance.

inherited
since

3.0.1

Type(s)

array

priorities

Translation array for LogEntry priorities to text strings.

inherited
since

3.0.1

Type(s)

array