Get instance of this class
object Current
getInstance
([ $facility = LOG_DAEMON])
Close logging facilities and flush output buffering
void
__destruct
()
Wrapper around the logit method. Log a message only if the specified level for this function is less or equal than the current debugging level.
boolean
debug
(mixed $msg, [integer $to_level = 1])
-
mixed
$msg: Message to log
-
integer
$to_level: Debug level where this message should be displayed. Default 1.
Get the current debugging level.
integer
getDebugLevel
()
The name displayed in syslog
mixed
getIdentifier
()
Log a message to the HTTPD log
This method is a wrapper around the error_log function
boolean
loghttpd
([ $message = ''])
Log a message.
boolean
logit
([mixed $message = ''], [integer $criticality = LOG_INFO])
-
mixed
$message: Message to log
-
integer
$criticality: How critical is this message? Default is informational
Send an email to root
This is a wrapper around the php mail function
boolean
mailit
( $subject, $message, [ $to = 'root'])
Open logging facility specified for the user
boolean
openFacility
([integer $facility = LOG_DAEMON])
-
integer
$facility: Facility to open. Default is LOG_DAEMON
Set debugging level. It will cause to print all debugging messages less or equal than the value we specify in this function.
boolean
setDebugLevel
([integer $var = 1])
-
integer
$var: Debug level. Default 1. 0 means no debugging
Set the script name which will be displayed in syslog
boolean
setIdentifier
([mixed $name = NULL])
-
mixed
$name: Name to set to
Divert logging to Email
boolean
setLogToEmail
([boolean $var = true])
-
boolean
$var: Activate or deactivate LogToEmail logging. Default is to activate ($var=true)
Divert logging to httpd
void
setLogToHttpd
([boolean $var = true])
-
boolean
$var: Activate or deactivate httpd logging. Default is to activate ($var=true)
Divert logging to StdErr
void
setLogToStdErr
([boolean $var = true])
-
boolean
$var: Activate or deactivate StdErr logging. Default is to activate ($var=true)
Divert logging to StdOut
void
setLogToStdOut
([boolean $var = true])
-
boolean
$var: Activate or deactivate StdOut logging. Default is to activate ($var=true)
Wrapper around the logit method.
This method logs by default to the stderr stream defined by the chosen facility
boolean
showError
([mixed $error = NULL])
-
mixed
$error: The error message to display
Wrapper around the logit method.
This method logs by default to the stdout stream defined by the chosen facility
boolean
showMessage
([ $message = NULL], mixed $error)
-
mixed
$error: The error message to display
-
$message
Prevent clonning the instance
void
__clone
()