PHP 클래스 Prado\Util\TFileLogRoute

TFileLogRoute records log messages in files. The log files are stored under {@link setLogPath LogPath} and the file name is specified by {@link setLogFile LogFile}. If the size of the log file is greater than {@link 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 {@link setMaxLogFiles MaxLogFiles} specifies how many files to be kept.
부터: 3.0
저자: Qiang Xue ([email protected])
상속: extends TLogRoute
파일 보기 프로젝트 열기: pradosoft/prado

공개 메소드들

메소드 설명
getLogFile ( ) : string
getLogPath ( ) : string
getMaxFileSize ( ) : integer
getMaxLogFiles ( ) : integer
setLogFile ( $value )
setLogPath ( $value )
setMaxFileSize ( $value )
setMaxLogFiles ( $value )

보호된 메소드들

메소드 설명
processLogs ( $logs ) Saves log messages in files.
rotateFiles ( ) Rotates log files.

메소드 상세

getLogFile() 공개 메소드

public getLogFile ( ) : string
리턴 string log file name. Defaults to 'prado.log'.

getLogPath() 공개 메소드

public getLogPath ( ) : string
리턴 string directory storing log files. Defaults to application runtime path.

getMaxFileSize() 공개 메소드

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

getMaxLogFiles() 공개 메소드

public getMaxLogFiles ( ) : integer
리턴 integer number of files used for rotation. Defaults to 2.

processLogs() 보호된 메소드

Saves log messages in files.
protected processLogs ( $logs )

rotateFiles() 보호된 메소드

Rotates log files.
protected rotateFiles ( )

setLogFile() 공개 메소드

public setLogFile ( $value )

setLogPath() 공개 메소드

public setLogPath ( $value )

setMaxFileSize() 공개 메소드

public setMaxFileSize ( $value )

setMaxLogFiles() 공개 메소드

public setMaxLogFiles ( $value )