EventLog
Model for logging system errors and debug trace messages
class System\Models\EventLog
extends Model
Extends
Class | Description |
---|---|
Model
|
Properties
protected
$jsonable
:
array
= ["details"]
List of attribute names which are json encoded and decoded from the database.
protected
$table
:
string
= "system_event_logs"
The database table used by the model.
Methods
public
static
add (string $message, string $level = "info"
, $details = null
)
: self
Creates a log record
Parameters
Property | Type | Description |
---|---|---|
$message | string |
string
|
$level | string |
string
|
$details | mixed |
mixed
|
Returns
self
public getLevelAttribute (string $level) : string
Beautify level value.
Parameters
Property | Type | Description |
---|---|---|
$level | string |
string
|
Returns
string
public getSummaryAttribute () : string
Creates a shorter version of the message attribute, extracts the exception message or limits by 100 characters.
Returns
string
public static useLogging () : bool
Returns true if this logger should be used.
Returns
bool
Copyright © 2024 Winter CMS