Stud.IP  2.4 Revision 48548
 All Data Structures Namespaces Files Functions Variables Groups Pages
Log Class Reference
Collaboration diagram for Log:
Collaboration graph

Public Member Functions

 __construct ($log_handler=null)
 setLogLevel ($level)
 getLogLevel ()
 setHandler ($log_handler)
 getHandler ()
 log ($message, $level=Log::ERROR)
 __call ($name, $arguments)

Static Public Member Functions

static get ($name= '')
static set ($name= '', $log_handler=null)
static __callStatic ($name, $arguments)

Data Fields

const FATAL = 0
const ALERT = 1
const CRITICAL = 2
const ERROR = 3
const WARNING = 4
const NOTICE = 5
const INFO = 6
const DEBUG = 7

Constructor & Destructor Documentation

__construct (   $log_handler = null)

create new log instance with given handler

Parameters
mixed$log_handler

Member Function Documentation

__call (   $name,
  $arguments 
)

magic log, intercepts all undefined method calls called method name must be log level name or part of

Parameters
string$name
array$arguments
Returns
mixed number of written bytes or return value from callable handler
static __callStatic (   $name,
  $arguments 
)
static

magic log, intercepts all static method calls called method names are splitted by an underscore first part denotes log level, second name of logger if any

Parameters
string$name
array$arguments
Returns
mixed number of written bytes or return value from callable handler

Here is the call graph for this function:

static get (   $name = '')
static

returns a log instance, identified by given name if name is omitted, the default logger is returned

Parameters
string$namename of log instance
Exceptions
InvalidArgumentException
Returns
Log

Here is the call graph for this function:

Here is the caller graph for this function:

getHandler ( )

returns the current log handler

Returns
mixed
getLogLevel ( )

returns the current maximum log level

Returns
integer
log (   $message,
  $level = Log::ERROR 
)

log a message

Parameters
string$messagethe log message
integer$levellog level, see constants
Returns
mixed number of written bytes or return value from callable handler
static set (   $name = '',
  $log_handler = null 
)
static

sets a log handler for the named log instance returns the old handler

Parameters
string$name
mixed$log_handler
Returns
mixed

Here is the caller graph for this function:

setHandler (   $log_handler)

set the log handler returns the old handler

Parameters
mixed$log_handler
Returns
mixed
setLogLevel (   $level)

set the maximum log level

Parameters
integer$level
Returns
integer

Field Documentation

const ALERT = 1
const CRITICAL = 2
const DEBUG = 7
const ERROR = 3
const FATAL = 0
const INFO = 6
const NOTICE = 5
const WARNING = 4

The documentation for this class was generated from the following file: