DatabaseLogger
Extends LoggerJoomla! 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 |
|---|---|
| package |
Joomla CMS |
Methods
__construct
Constructor.
__construct(array &options) : mixed
| since |
3.0.1 |
|---|
Arguments
- options
arrayLog object options.
Response
mixed
addEntry
Method to add an entry to the log.
addEntry(\Joomla\CMS\Log\LogEntry entry) : void
| since |
3.0.1 |
|---|---|
| throws |
|
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 |
|
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.
| since |
3.0.1 |
|---|
Type(s)
array
priorities
Translation array for LogEntry priorities to text strings.
| since |
3.0.1 |
|---|
Type(s)
array