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(mixed||string|int &options) :
since |
1.7.0 |
---|
Arguments
- options
array<string|int, mixed>
Log object options.
Response
mixed
addEntry
Method to add an entry to the log.
addEntry(\Joomla\CMS\Log\LogEntry entry) :
since |
1.7.0 |
---|---|
throws |
|
Arguments
- entry
LogEntry
The log entry object to add to the log.
Response
void
connect
Method to connect to the database server based on object properties.
connect() :
since |
1.7.0 |
---|---|
throws |
|
Response
void
Properties
options
Options array for the Log instance.
since |
3.0.1 |
---|
Type(s)
array<string|int, mixed>
priorities
Translation array for LogEntry priorities to text strings.
since |
3.0.1 |
---|
Type(s)
array<string|int, mixed>
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
prefix
The database table prefix of the database store logging entries.
since |
4.3.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)
DatabaseDriver