PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class TFileLogRoute

TFileLogRoute class.

TFileLogRoute records log messages in files. The log files are stored under setLogPath LogPath and the file name is specified by setLogFile LogFile. If the size of the log file is greater than setMaxFileSize MaxFileSize (in kilo-bytes), a rotation is performed, which renames the current log file by suffixing the file name with '.1'. All existing log files are moved backwards one place, i.e., '.2' to '.3', '.1' to '.2'. The property setMaxLogFiles MaxLogFiles specifies how many files to be kept.

TComponent
Extended by TApplicationComponent
Extended by TLogRoute
Extended by TFileLogRoute
Package: System\Util
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 3.0
Located at Util/TLogRouter.php
Methods summary
public string
# getLogPath( )

Returns

string
directory storing log files. Defaults to application runtime path.
public
# setLogPath( string $value )

Parameters

$value
string
directory (in namespace format) storing log files.

Throws

TConfigurationException
if log path is invalid
public string
# getLogFile( )

Returns

string
log file name. Defaults to 'prado.log'.
public
# setLogFile( string $value )

Parameters

$value
string
log file name
public integer
# getMaxFileSize( )

Returns

integer
maximum log file size in kilo-bytes (KB). Defaults to 1024 (1MB).
public
# setMaxFileSize( integer $value )

Parameters

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

Throws

TInvalidDataValueException
if the value is smaller than 1.
public integer
# getMaxLogFiles( )

Returns

integer
number of files used for rotation. Defaults to 2.
public
# setMaxLogFiles( integer $value )

Parameters

$value
integer
number of files used for rotation.
protected
# processLogs( array $logs )

Saves log messages in files.

Saves log messages in files.

Parameters

$logs
array
list of log messages
protected
# rotateFiles( )

Rotates log files.

Rotates log files.

Methods inherited from TLogRoute
collectLogs(), formatLogMessage(), getCategories(), getLevelName(), getLevelValue(), getLevels(), init(), setCategories(), setLevels()
Methods inherited from TApplicationComponent
getApplication(), getRequest(), getResponse(), getService(), getSession(), getUser(), publishAsset(), publishFilePath()
Methods inherited from TComponent
__call(), __construct(), __destruct(), __get(), __isset(), __set(), __sleep(), __unset(), __wakeup(), addParsedObject(), asa(), attachBehavior(), attachBehaviors(), attachClassBehavior(), attachEventHandler(), canGetProperty(), canSetProperty(), clearBehaviors(), createdOnTemplate(), detachBehavior(), detachBehaviors(), detachClassBehavior(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), evaluateStatements(), fxAttachClassBehavior(), fxDetachClassBehavior(), getAutoGlobalListen(), getBehaviorsEnabled(), getClassHierarchy(), getEventHandlers(), getListeningToGlobalEvents(), getSubProperty(), hasEvent(), hasEventHandler(), hasProperty(), isa(), listen(), raiseEvent(), setSubProperty(), unlisten()
Constants inherited from TComponent
GLOBAL_RAISE_EVENT_LISTENER
Properties inherited from TLogRoute
$_levelNames, $_levelValues
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO