Logger
    
            
            in package
            
        
    
    
    
Log class used for debug and exception logging.
Tags
Table of Contents
Properties
- $classname : string
- The name of the class that this Logger is logging for.
- $debugClasses : array<string|int, mixed>
- An array of class names that will be logged at debug level, regardless of the global Logger::level setting.
- $level : string
- The logging level applied accross the system. Valid options are DEBUG, INFO, WARN, ERROR, FATAL, and SQL.
- $logProvider : LogProviderFile
- The log file the log entries will be saved to.
- $request : Request
- A request object that will give us the IP, user-agent etc. of the client we are logging for.
Methods
- __construct() : mixed
- The constructor.
- action() : void
- Log an action carried out by a person to the ActionLog table.
- debug() : void
- Log a DEBUG message.
- error() : void
- Log an ERROR message.
- fatal() : void
- Log a FATAL message.
- info() : void
- Log an INFO message.
- notifyAdmin() : void
- Notify the sys admin via email when a serious error occurs.
- setLogProviderFile() : void
- Allows you to set the log file path to one other than the main application log.
- sql() : void
- Log a SQL queries.
- warn() : void
- Log a WARN message.
Properties
$classname
The name of the class that this Logger is logging for.
    private
        string
    $classname
    
    
    
    
    Tags
$debugClasses
An array of class names that will be logged at debug level, regardless of the global Logger::level setting.
    private
        array<string|int, mixed>
    $debugClasses
     = array()
    
    
    
    Tags
$level
The logging level applied accross the system. Valid options are DEBUG, INFO, WARN, ERROR, FATAL, and SQL.
    private
        string
    $level
    
    
    
    
    Tags
$logProvider
The log file the log entries will be saved to.
    private
        LogProviderFile
    $logProvider
    
    
    
    
    Tags
$request
A request object that will give us the IP, user-agent etc. of the client we are logging for.
    private
        Request
    $request
    
    
    
    
    Tags
Methods
__construct()
The constructor.
    public
                    __construct(string $classname) : mixed
    Parameters
- $classname : string
Tags
action()
Log an action carried out by a person to the ActionLog table.
    public
                    action(string $message) : void
    Parameters
- $message : string
Tags
debug()
Log a DEBUG message.
    public
                    debug(string $message) : void
    Parameters
- $message : string
Tags
error()
Log an ERROR message.
    public
                    error(string $message) : void
    Parameters
- $message : string
Tags
fatal()
Log a FATAL message.
    public
                    fatal(string $message) : void
    Parameters
- $message : string
Tags
info()
Log an INFO message.
    public
                    info(string $message) : void
    Parameters
- $message : string
Tags
notifyAdmin()
Notify the sys admin via email when a serious error occurs.
    public
                    notifyAdmin(string $message) : void
    Parameters
- $message : string
Tags
setLogProviderFile()
Allows you to set the log file path to one other than the main application log.
    public
                    setLogProviderFile(string $filepath) : void
    Parameters
- $filepath : string
Tags
sql()
Log a SQL queries.
    public
                    sql(string $message) : void
    Parameters
- $message : string
Tags
warn()
Log a WARN message.
    public
                    warn(string $message) : void
    Parameters
- $message : string