PHP 클래스 DefaultLogger, symfony-1.4

Currently, it only writes which targets are being executed, and any messages that get logged.
또한 보기: BuildEvent
저자: Andreas Aderhold ([email protected])
상속: implements StreamRequiredBuildLogger
파일 보기 프로젝트 열기: vjousse/symfony-1.4 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$err Stream to use for error output.
$msgOutputLevel integer @var int
$out Stream to use for standard output.
$startTime integer @var int

공개 메소드들

메소드 설명
__construct ( ) Construct a new default logger.
buildFinished ( BuildEvent $event ) Prints whether the build succeeded or failed, and any errors that occured during the build. Also outputs the total build-time.
buildStarted ( BuildEvent $event ) Sets the start-time when the build started. Used for calculating the build-time.
formatTime ( $micros ) Formats a time micro integer to human readable format.
messageLogged ( BuildEvent $event ) Print a message to the stdout.
setErrorStream ( OutputStream $err ) Sets the error stream.
setMessageOutputLevel ( integer $level ) Set the msgOutputLevel this logger is to respond to.
setOutputStream ( OutputStream $output ) Sets the output stream.
targetFinished ( BuildEvent $event ) Fired when a target has finished. We don't need specific action on this event. So the methods are empty.
targetStarted ( BuildEvent $event ) Prints the current target name
taskFinished ( BuildEvent $event ) Fired when a task has finished. We don't need specific action on this event. So the methods are empty.
taskStarted ( BuildEvent $event ) Fired when a task is started. We don't need specific action on this event. So the methods are empty.

보호된 메소드들

메소드 설명
getBuildFailedMessage ( ) : string Get the message to return when a build failed.
getBuildSuccessfulMessage ( ) : string Get the message to return when a build succeeded.
printMessage ( string $message, OutputStream $stream, integer $priority ) : void Prints a message to console.

메소드 상세

__construct() 공개 메소드

Construct a new default logger.
public __construct ( )

buildFinished() 공개 메소드

@param object The BuildEvent
또한 보기: BuildEvent::getException()
public buildFinished ( BuildEvent $event )
$event BuildEvent

buildStarted() 공개 메소드

@param object The BuildEvent
public buildStarted ( BuildEvent $event )
$event BuildEvent

formatTime() 공개 정적인 메소드

@param integer The time stamp
public static formatTime ( $micros )

getBuildFailedMessage() 보호된 메소드

Get the message to return when a build failed.
protected getBuildFailedMessage ( ) : string
리턴 string The classic "BUILD FAILED"

getBuildSuccessfulMessage() 보호된 메소드

Get the message to return when a build succeeded.
protected getBuildSuccessfulMessage ( ) : string
리턴 string The classic "BUILD FINISHED"

messageLogged() 공개 메소드

@param object The BuildEvent
public messageLogged ( BuildEvent $event )
$event BuildEvent

printMessage() 보호된 메소드

Prints a message to console.
protected printMessage ( string $message, OutputStream $stream, integer $priority ) : void
$message string The message to print. Should not be null.
$stream OutputStream The stream to use for message printing.
$priority integer The priority of the message. (Ignored in this implementation.)
리턴 void

setErrorStream() 공개 메소드

Sets the error stream.
public setErrorStream ( OutputStream $err )
$err OutputStream

setMessageOutputLevel() 공개 메소드

Only messages with a message level lower than or equal to the given level are output to the log.

Constants for the message levels are in Project.php. The order of the levels, from least to most verbose, is:

  • Project::MSG_ERR
  • Project::MSG_WARN
  • Project::MSG_INFO
  • Project::MSG_VERBOSE
  • Project::MSG_DEBUG
The default message level for DefaultLogger is Project::MSG_ERR.
public setMessageOutputLevel ( integer $level )
$level integer The logging level for the logger.

setOutputStream() 공개 메소드

Sets the output stream.
public setOutputStream ( OutputStream $output )
$output OutputStream

targetFinished() 공개 메소드

@param object The BuildEvent
또한 보기: BuildEvent::getException()
public targetFinished ( BuildEvent $event )
$event BuildEvent

targetStarted() 공개 메소드

@param object The BuildEvent
public targetStarted ( BuildEvent $event )
$event BuildEvent

taskFinished() 공개 메소드

@param object The BuildEvent
public taskFinished ( BuildEvent $event )
$event BuildEvent

taskStarted() 공개 메소드

@param object The BuildEvent
public taskStarted ( BuildEvent $event )
$event BuildEvent

프로퍼티 상세

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

Stream to use for error output.
protected $err

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

@var int
protected int $msgOutputLevel
리턴 integer

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

Stream to use for standard output.
protected $out

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

@var int
protected int $startTime
리턴 integer