ZurmoFileLogger Class Reference

Inheritance diagram for ZurmoFileLogger:
JobManagerFileLogger ZurmoRedBeanQueryFileLogger

Public Member Functions

 init ()
 getLogPath ()
 setLogPath ($value)
 getLogFile ()
 setLogFile ($value)
 getMaxFileSize ()
 setMaxFileSize ($value)
 getMaxLogFiles ()
 setMaxLogFiles ($value)
 getLogs ()
 setLogs ($logs= '')
 log ()
 processLogs ()

Protected Member Functions

 addLog ($data)
 rotateFiles ()

Protected Attributes

 $maxFileSize = 1024
 $maxLogFiles = 5
 $logPath
 $logFile = 'fileLogger.log'
 $logs = ''

Detailed Description

Log data into file.

Definition at line 40 of file ZurmoFileLogger.php.


Member Function Documentation

init (  ) 

Initializes the route. This method is invoked after the route is created by the route manager.

Definition at line 71 of file ZurmoFileLogger.php.

getLogPath (  ) 
Returns:
string directory storing log files. Defaults to application runtime path.

Definition at line 82 of file ZurmoFileLogger.php.

setLogPath ( value  ) 
Parameters:
string $value directory for storing log files.
Exceptions:
CException if the path is invalid

Reimplemented in JobManagerFileLogger.

Definition at line 91 of file ZurmoFileLogger.php.

getLogFile (  ) 
Returns:
string log file name. Defaults to 'application.log'.

Definition at line 104 of file ZurmoFileLogger.php.

setLogFile ( value  ) 
Parameters:
string $value log file name

Definition at line 112 of file ZurmoFileLogger.php.

getMaxFileSize (  ) 
Returns:
integer maximum log file size in kilo-bytes (KB). Defaults to 1024 (1MB).

Definition at line 120 of file ZurmoFileLogger.php.

setMaxFileSize ( value  ) 
Parameters:
integer $value maximum log file size in kilo-bytes (KB).

Definition at line 128 of file ZurmoFileLogger.php.

getMaxLogFiles (  ) 
Returns:
integer number of files used for rotation. Defaults to 5.

Definition at line 139 of file ZurmoFileLogger.php.

setMaxLogFiles ( value  ) 
Parameters:
integer $value number of files used for rotation.

Definition at line 147 of file ZurmoFileLogger.php.

getLogs (  ) 
Returns:
string

Definition at line 158 of file ZurmoFileLogger.php.

setLogs ( logs = ''  ) 
Parameters:
string $logs

Definition at line 166 of file ZurmoFileLogger.php.

addLog ( data  )  [protected]

Add log at the end of current logs

Parameters:
$data 

Reimplemented in JobManagerFileLogger.

Definition at line 175 of file ZurmoFileLogger.php.

log (  ) 

Save log into memory. On EndRequest, this logs will be saved into file.

Reimplemented in JobManagerFileLogger.

Definition at line 186 of file ZurmoFileLogger.php.

processLogs (  ) 

Save sql query logs into file

Reimplemented in ZurmoRedBeanQueryFileLogger, and JobManagerFileLogger.

Definition at line 208 of file ZurmoFileLogger.php.

rotateFiles (  )  [protected]

Rotates log files.

Definition at line 225 of file ZurmoFileLogger.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Fri Nov 17 07:10:30 2017