PHP 클래스 Pop\Log\Logger

저자: Nick Sagona, III ([email protected])
파일 보기 프로젝트 열기: nicksagona/PopPHP 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$priorities array Message priority short codes
$timestamp string Log timestamp format
$writers array Log writers

공개 메소드들

메소드 설명
__construct ( Pop\Log\Writer\WriterInterface $writer = null ) : Logger Constructor
addWriter ( Pop\Log\Writer\WriterInterface $writer ) : Logger Method to add a log writer
alert ( mixed $message, array $options = [] ) : Logger Method to add an ALERT log entry
crit ( mixed $message, array $options = [] ) : Logger Method to add a CRIT log entry
debug ( mixed $message, array $options = [] ) : Logger Method to add a DEBUG log entry
emerg ( mixed $message, array $options = [] ) : Logger Method to add an EMERG log entry
err ( mixed $message, array $options = [] ) : Logger Method to add an ERR log entry
getTimestamp ( ) : string Method to get timestamp format
getWriters ( ) : array Method to get all log writers
info ( mixed $message, array $options = [] ) : Logger Method to add an INFO log entry
log ( integer $priority, mixed $message, array $options = [] ) : Logger Method to add a log entry
notice ( mixed $message, array $options = [] ) : Logger Method to add a NOTICE log entry
setTimestamp ( string $format = 'Y-m-d H:i:s' ) : Logger Method to set timestamp format
warn ( mixed $message, array $options = [] ) : Logger Method to add a WARN log entry

메소드 상세

__construct() 공개 메소드

Instantiate the logger object.
public __construct ( Pop\Log\Writer\WriterInterface $writer = null ) : Logger
$writer Pop\Log\Writer\WriterInterface
리턴 Logger

addWriter() 공개 메소드

Method to add a log writer
public addWriter ( Pop\Log\Writer\WriterInterface $writer ) : Logger
$writer Pop\Log\Writer\WriterInterface
리턴 Logger

alert() 공개 메소드

Method to add an ALERT log entry
public alert ( mixed $message, array $options = [] ) : Logger
$message mixed
$options array
리턴 Logger

crit() 공개 메소드

Method to add a CRIT log entry
public crit ( mixed $message, array $options = [] ) : Logger
$message mixed
$options array
리턴 Logger

debug() 공개 메소드

Method to add a DEBUG log entry
public debug ( mixed $message, array $options = [] ) : Logger
$message mixed
$options array
리턴 Logger

emerg() 공개 메소드

Method to add an EMERG log entry
public emerg ( mixed $message, array $options = [] ) : Logger
$message mixed
$options array
리턴 Logger

err() 공개 메소드

Method to add an ERR log entry
public err ( mixed $message, array $options = [] ) : Logger
$message mixed
$options array
리턴 Logger

getTimestamp() 공개 메소드

Method to get timestamp format
public getTimestamp ( ) : string
리턴 string

getWriters() 공개 메소드

Method to get all log writers
public getWriters ( ) : array
리턴 array

info() 공개 메소드

Method to add an INFO log entry
public info ( mixed $message, array $options = [] ) : Logger
$message mixed
$options array
리턴 Logger

log() 공개 메소드

Method to add a log entry
public log ( integer $priority, mixed $message, array $options = [] ) : Logger
$priority integer
$message mixed
$options array
리턴 Logger

notice() 공개 메소드

Method to add a NOTICE log entry
public notice ( mixed $message, array $options = [] ) : Logger
$message mixed
$options array
리턴 Logger

setTimestamp() 공개 메소드

Method to set timestamp format
public setTimestamp ( string $format = 'Y-m-d H:i:s' ) : Logger
$format string
리턴 Logger

warn() 공개 메소드

Method to add a WARN log entry
public warn ( mixed $message, array $options = [] ) : Logger
$message mixed
$options array
리턴 Logger

프로퍼티 상세

$priorities 보호되어 있는 프로퍼티

Message priority short codes
protected array $priorities
리턴 array

$timestamp 보호되어 있는 프로퍼티

Log timestamp format
protected string $timestamp
리턴 string

$writers 보호되어 있는 프로퍼티

Log writers
protected array $writers
리턴 array