EventLog

Model for logging system errors and debug trace messages

 class System\Models\EventLog
extends Model

Extends

Class Description
Model

Properties

protected $jsonable : array

List of attribute names which are json encoded and decoded from the database.

protected $table : string

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 Description
$message
string
$level
string
$details
mixed
Returns
self

public getLevelAttribute (string $level) : string

Beautify level value.

Parameters
Property Description
$level
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