Core_Log
in package
AbstractYes
Log system. Notify if status >= MAIL_EVENTS_STATUS. To disable notification call ->notify(FALSE)
Core_Log::instance()->clear()
->status(Core_Log::$MESSAGE)
->write('text');
Tags
Table of Contents
Properties
- $ERROR : int
- Backend property
- $MESSAGE : int
- Backend property
- $NOTICE : int
- Backend property
- $SUCCESS : int
- Backend property
- $WARNING : int
- Backend property
- $_login : string
- User login
- $_notify : bool
- E-mail notify mode
- $_site : string
- Name of the site
- $_status : int
- Status
- $_instance : array<string|int, mixed>
- The singleton instance.
Methods
- clear() : self
- Clear object
- instance() : object
- Register an existing instance as a singleton.
- login() : self
- Set login
- notify() : self
- Set notify mode
- site() : self
- Set site name
- status() : self
- Set status
- write() : mixed
- _getDriverName() : srting
- Get full driver name
Properties
$ERROR
Backend property
public
static int
$ERROR
= 4
$MESSAGE
Backend property
public
static int
$MESSAGE
= 0
$NOTICE
Backend property
public
static int
$NOTICE
= 2
$SUCCESS
Backend property
public
static int
$SUCCESS
= 1
$WARNING
Backend property
public
static int
$WARNING
= 3
$_login
User login
protected
string
$_login
= \NULL
$_notify
E-mail notify mode
protected
bool
$_notify
= \TRUE
$_site
Name of the site
protected
string
$_site
= \NULL
$_status
Status
protected
int
$_status
= 0
$_instance
The singleton instance.
private
static array<string|int, mixed>
$_instance
= array()
Methods
clear()
Clear object
public
clear() : self
Return values
selfinstance()
Register an existing instance as a singleton.
public
static instance([string $name = 'default' ]) : object
Parameters
- $name : string = 'default'
-
driver's name
Return values
objectlogin()
Set login
public
login(string $login) : self
Parameters
- $login : string
-
login
Return values
selfnotify()
Set notify mode
public
notify(int $notify) : self
Parameters
- $notify : int
-
mode
Return values
selfsite()
Set site name
public
site(string $site) : self
Parameters
- $site : string
-
name
Return values
selfstatus()
Set status
public
status(string $status) : self
Parameters
- $status : string
-
status
Return values
selfwrite()
public
abstract write(mixed $message) : mixed
Parameters
- $message : mixed
_getDriverName()
Get full driver name
protected
static _getDriverName(string $driver) : srting
Parameters
- $driver : string
-
driver name