« SeasLog::analyzerDetail
SeasLog::__construct »

SeasLog::closeLoggerStream

(PECL seaslog >=1.8.6)

SeasLog::closeLoggerStream — Manually release stream flow from logger

説明

public static function SeasLog::closeLoggerStream(int $model, string $logger): bool

Manually release stream flow from logger. SeasLog caches the stream handle opened by the log logger to save the overhead of creating a stream. The handle will be automatically released at the end of the request. If in CLI mode, the process will also automatically release when it exits. Or you can use the following functions to manually release(manually release function needs to update SeasLog 1.8.6 or updated version).

パラメータ

model

Constant int.

logger

The logger name.

戻り値

Return TRUE on released stream flow success, FALSE on failure.

例

例1 SeasLog::closeLoggerStream() example

<?php

var_dump(SeasLog::closeLoggerStream());
var_dump(SeasLog::closeLoggerStream(SEASLOG_CLOSE_LOGGER_STREAM_MOD_ALL));
var_dump(SeasLog::closeLoggerStream(SEASLOG_CLOSE_LOGGER_STREAM_MOD_ASSIGN, 'logger_name'));

?>

上の例の出力は、 たとえば以下のようになります。

bool(true)
bool(true)
bool(true)

参考

関連キーワード:
SeasLog   logger   release   stream   closeLoggerStream   flow   Manually   dump   model   handle   automatically   released   manually   analyzerDetail   construct   seaslog   static   caches   opened   save   overhead   creating   request   mode   process
関連する関数・ページ:
seaslog.setlogger   seaslog.construct   seaslog.getlastlogger   seaslog.notice   seaslog.critical   class.seaslog