Logger
in package
Log action into database
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- add() : void
- Insert event into database
- reset() : void
- Clean log history
- getIp() : string
- Get ip address (for easier hiding/hashing if necessary)
Properties
$db
private
SQL
$db
$insert
private
PDOStatement
$insert
Methods
__construct()
public
__construct(SQL $db) : mixed
Parameters
- $db : SQL
add()
Insert event into database
public
add(string $component, string|null $detail[, int $userId = 0 ][, int $critical = 0 ]) : void
Parameters
- $component : string
- $detail : string|null
- $userId : int = 0
- $critical : int = 0
reset()
Clean log history
public
reset(int $userId) : void
Parameters
- $userId : int
getIp()
Get ip address (for easier hiding/hashing if necessary)
protected
getIp() : string