CakeFest 2024: The Official CakePHP Conference

SeasLog::getLastLogger

(PECL seaslog >=1.0.0)

SeasLog::getLastLogger获得 SeasLog 最近的一次 Logger 名称

说明

public static SeasLog::getLastLogger(): string

使用函数 SeasLog::getLastLogger() 将获取 php.ini(seaslog.ini) 中配置的 seaslog.default_logger 值。

参数

此函数没有参数。

返回值

使用函数 SeasLog::setLogger() 将改变函数 SeasLog::getLastLogger() 的取值。

示例

示例 #1 SeasLog::getLastLogger() 示例

<?php

var_dump
(SeasLog::getLastLogger());
SeasLog::setLogger('theNewLogger');
var_dump(SeasLog::getLastLogger());
?>

以上示例的输出类似于:

string(7) "default"
string(12) "theNewLogger"

参见

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top