Moodle  2.2.1
http://www.collinsharper.com
Moxiecode_Logger Class Reference

Public Member Functions

 Moxiecode_Logger ()
 setLevel ($level)
 getLevel ()
 setPath ($path)
 getPath ()
 setFileName ($file_name)
 getFileName ()
 setFormat ($format)
 getFormat ()
 setMaxSize ($size)
 getMaxSize ()
 setMaxFiles ($max_files)
 getMaxFiles ()
 debug ($msg)
 info ($msg)
 warn ($msg)
 error ($msg)
 fatal ($msg)
 isDebugEnabled ()
 isInfoEnabled ()
 isWarnEnabled ()
 isErrorEnabled ()
 isFatalEnabled ()
 _logMsg ($level, $message)
 toOSPath ($path)

Data Fields

 $_path
 $_filename
 $_maxSize
 $_maxFiles
 $_maxSizeBytes
 $_level
 $_format

Detailed Description

Logging utility class. This class handles basic logging with levels, log rotation and custom log formats. It's designed to be compact but still powerful and flexible.

Definition at line 21 of file Logger.php.


Member Function Documentation

_logMsg ( level,
message 
)

Definition at line 186 of file Logger.php.

Here is the call graph for this function:

Here is the caller graph for this function:

debug ( msg)

Definition at line 141 of file Logger.php.

Here is the call graph for this function:

error ( msg)

Definition at line 156 of file Logger.php.

Here is the call graph for this function:

fatal ( msg)

Definition at line 161 of file Logger.php.

Here is the call graph for this function:

Definition at line 101 of file Logger.php.

getFormat ( )

Definition at line 109 of file Logger.php.

getLevel ( )

Returns the current log level for example MC_LOGGER_DEBUG.

Returns:
int Current log level for example MC_LOGGER_DEBUG.

Definition at line 85 of file Logger.php.

Definition at line 137 of file Logger.php.

Definition at line 129 of file Logger.php.

getPath ( )

Definition at line 93 of file Logger.php.

info ( msg)

Definition at line 146 of file Logger.php.

Here is the call graph for this function:

Definition at line 166 of file Logger.php.

Definition at line 178 of file Logger.php.

Definition at line 182 of file Logger.php.

Definition at line 170 of file Logger.php.

Definition at line 174 of file Logger.php.

Constructs a new logger instance.

Definition at line 34 of file Logger.php.

Here is the call graph for this function:

setFileName ( file_name)

Definition at line 97 of file Logger.php.

setFormat ( format)

Definition at line 105 of file Logger.php.

setLevel ( level)

Sets the current log level, use the MC_LOGGER constants.

Parameters:
int$levelLog level instance for example MC_LOGGER_DEBUG.

Definition at line 48 of file Logger.php.

setMaxFiles ( max_files)

Definition at line 133 of file Logger.php.

setMaxSize ( size)

Definition at line 113 of file Logger.php.

Here is the caller graph for this function:

setPath ( path)

Definition at line 89 of file Logger.php.

toOSPath ( path)

Converts a Unix path to OS specific path.

Parameters:
String$pathUnix path to convert.

Definition at line 263 of file Logger.php.

Here is the caller graph for this function:

warn ( msg)

Definition at line 151 of file Logger.php.

Here is the call graph for this function:


Field Documentation

$_filename

Definition at line 24 of file Logger.php.

$_format

Definition at line 29 of file Logger.php.

$_level

Definition at line 28 of file Logger.php.

$_maxFiles

Definition at line 26 of file Logger.php.

$_maxSize

Definition at line 25 of file Logger.php.

$_maxSizeBytes

Definition at line 27 of file Logger.php.

$_path

Definition at line 23 of file Logger.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations