\FileLogger
File logger
A basic implementation of logging mechanism intended for debugging
- Author: SOFORT AG (integration@sofort.com)
- Copyright: 2010-2014 SOFORT AG
- License: Released under the GNU LESSER GENERAL PUBLIC LICENSE (Version 3)
Synopsis
class FileLogger
extends AbstractLoggerHandler
{
- // members
- public $fp = NULL;
- public integer $maxFilesize = 1048576;
- protected boolean $_errorLogfilePath = false;
- protected boolean $_logfilePath = false;
- protected boolean $_warningsLogfilePath = false;
- // methods
- public void __construct()
- public bool log()
- public void setLogfilePath()
- protected bool _log()
- protected bool _logRotate()
- // Inherited methods from AbstractLoggerHandler
- public void __construct()
- public abstract void log()
Hierarchy
Extends
Members
protected
- $_errorLogfilePath
—
string
Path to errors logfile - $_logfilePath
—
string
Path to Logfile - $_warningsLogfilePath
—
string
Path to warnings logfile
public
- $fp
—
resource
File Handler - $maxFilesize
—
int
Maximum size of a log file in Bytes
Methods
protected
- _log() — Logs $msg to a file which path is being set by it's unified resource locator
- _logRotate() — Copy the content of the logfile to a backup file if file size got too large Put the old log file into a tarball for later reference
public
- __construct() — Constructor Setting the LogfilePaths
- log() — Setting a log entry
- setLogfilePath() — Set the path of the logfile