PHP 클래스 MongoLog

파일 보기 프로젝트 열기: alcaeus/mongo-php-adapter 1 사용 예제들

공개 메소드들

메소드 설명
getCallback ( ) : callable | null (PECL mongo >= 1.3.0) Gets the previously set callback function
getLevel ( ) : integer This can be used to see the log level. Use the constants described in the MongoLog section with bitwise operators to check the level.
getModule ( ) : integer This function can be used to see which parts of the driver's functionality are being logged. Use the constants described in the MongoLog section with bitwise operators to check if specific modules are being logged.
setCallback ( callable $log_function ) : boolean (PECL mongo >= 1.3.0)

This function will set a callback function to be called for {@link http://www.php.net/manual/en/class.mongolog.php MongoLog} events instead of triggering warnings.

setLevel ( integer $level ) : void This function can be used to set how verbose logging should be and the types of activities that should be logged. Use the constants described in the MongoLog section with bitwise operators to specify levels.
setModule ( integer $module ) : void This function can be used to set which parts of the driver's functionality should be logged. Use the constants described in the MongoLog section with bitwise operators to specify modules.

메소드 상세

getCallback() 공개 정적인 메소드

(PECL mongo >= 1.3.0) Gets the previously set callback function
public static getCallback ( ) : callable | null
리턴 callable | null

getLevel() 공개 정적인 메소드

This can be used to see the log level. Use the constants described in the MongoLog section with bitwise operators to check the level.
public static getLevel ( ) : integer
리턴 integer Returns the current level

getModule() 공개 정적인 메소드

This function can be used to see which parts of the driver's functionality are being logged. Use the constants described in the MongoLog section with bitwise operators to check if specific modules are being logged.
public static getModule ( ) : integer
리턴 integer Returns the modules currently being logged

setCallback() 공개 정적인 메소드

public static setCallback ( callable $log_function ) : boolean
$log_function callable

The function to be called on events.

The function should have the following prototype

log_function ( int $module , int $level, string $message)
  • module

    One of the {@link http://www.php.net/manual/en/class.mongolog.php#mongolog.constants.module MongoLog module constants}.

  • level

    One of the {@link http://www.php.net/manual/en/class.mongolog.php#mongolog.constants.level MongoLog level constants}.

  • message

    The log message itself.

    리턴 boolean Returns TRUE on success or FALSE on failure.

    setLevel() 공개 정적인 메소드

    This function can be used to set how verbose logging should be and the types of activities that should be logged. Use the constants described in the MongoLog section with bitwise operators to specify levels.
    public static setLevel ( integer $level ) : void
    $level integer The levels you would like to log
    리턴 void

    setModule() 공개 정적인 메소드

    This function can be used to set which parts of the driver's functionality should be logged. Use the constants described in the MongoLog section with bitwise operators to specify modules.
    public static setModule ( integer $module ) : void
    $module integer The module(s) you would like to log
    리턴 void