DatabaseLog
in package
implements
LoggerInterface
Interfaces, Classes and Traits
- LoggerInterface
- Describes a logger instance.
Table of Contents
- $database : Database
- $table : string
- __construct() : mixed
- DatabaseLog constructor.
- alert() : void
- Action must be taken immediately.
- critical() : void
- Critical conditions.
- debug() : void
- Detailed debug information.
- emergency() : void
- System is unusable.
- error() : void
- Runtime errors that do not require immediate action but should typically be logged and monitored.
- info() : void
- Interesting events.
- log() : void
- Logs with an arbitrary level.
- notice() : void
- Normal but significant events.
- warning() : void
- Exceptional occurrences that are not errors.
- table() : QueryBuilder
- writer() : bool
- Log yazma işlemini gerçekleştirir
Properties
$database
protected
Database
$database
$table
protected
string
$table
= 'logger'
Methods
__construct()
DatabaseLog constructor.
public
__construct(Database $database, array<string|int, mixed> $config) : mixed
Parameters
- $database : Database
- $config : array<string|int, mixed>
Return values
mixed —alert()
Action must be taken immediately.
public
alert(string $message[, array<string|int, mixed> $context = array() ]) : void
Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.
Parameters
- $message : string
- $context : array<string|int, mixed> = array()
Return values
void —critical()
Critical conditions.
public
critical(string $message[, array<string|int, mixed> $context = array() ]) : void
Example: Application component unavailable, unexpected exception.
Parameters
- $message : string
- $context : array<string|int, mixed> = array()
Return values
void —debug()
Detailed debug information.
public
debug(string $message[, array<string|int, mixed> $context = array() ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = array()
Return values
void —emergency()
System is unusable.
public
emergency(string $message[, array<string|int, mixed> $context = array() ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = array()
Return values
void —error()
Runtime errors that do not require immediate action but should typically be logged and monitored.
public
error(string $message[, array<string|int, mixed> $context = array() ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = array()
Return values
void —info()
Interesting events.
public
info(string $message[, array<string|int, mixed> $context = array() ]) : void
Example: User logs in, SQL logs.
Parameters
- $message : string
- $context : array<string|int, mixed> = array()
Return values
void —log()
Logs with an arbitrary level.
public
log(mixed $level, string $message[, array<string|int, mixed> $context = array() ]) : void
Parameters
- $level : mixed
- $message : string
- $context : array<string|int, mixed> = array()
Return values
void —notice()
Normal but significant events.
public
notice(string $message[, array<string|int, mixed> $context = array() ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = array()
Return values
void —warning()
Exceptional occurrences that are not errors.
public
warning(string $message[, array<string|int, mixed> $context = array() ]) : void
Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.
Parameters
- $message : string
- $context : array<string|int, mixed> = array()
Return values
void —table()
protected
table() : QueryBuilder
Return values
QueryBuilder —writer()
Log yazma işlemini gerçekleştirir
protected
writer(string $message, array<string|int, mixed> $data, string $level) : bool
Parameters
- $message : string
- $data : array<string|int, mixed>
- $level : string