略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: SeasLog::closeLoggerStream

2024-12-22

SeasLog::closeLoggerStream

(PECL seaslog >=1.8.6)

SeasLog::closeLoggerStreamManually release stream flow from logger

说明

public static 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)

参见

add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/seaslog.closeloggerstream.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3