JLoggerDatabase

Extends \JLogger

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.

package

Joomla.Platform

subpackage

Log

since

11.1

Methods

__construct

Constructor.

__construct(array &$options) 
inherited
since

11.1

Arguments

$options

array

addEntry

Method to add an entry to the log.

addEntry(\JLogEntry $entry) : void
inherited abstract
since

11.1

Arguments

$entry

\JLogEntryThe log entry object to add to the log.

connect

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

connect() : void
since

11.1

throws

\LogException

Properties

driver

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

since

11.1

Type(s)

string

host

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

since

11.1

Type(s)

string

user

The database server user to connect as for the logger.

since

11.1

Type(s)

string

password

The password to use for connecting to the database server.

since

11.1

Type(s)

string

database

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

since

11.1

Type(s)

string

table

The database table to use for logging entries.

since

11.1

Type(s)

string

dbo

The database connection object for the logger.

since

11.1

Type(s)

\JDatabase

options

Options array for the JLog instance.

inherited
since

11.1

Type(s)

array