文件操作 - Monolog_Logger.php
返回文件管理
返回主菜单
删除本文件
文件: /home/www/public/wp-content/plugins/the-events-calendar/common/src/Tribe/Log/Monolog_Logger.php
编辑文件内容
<?php /** * An extension of the base Monolog logger to add our need to replace the instance, and global, loggers. * * @since 4.9.16 * * @package Tribe\Log */ namespace Tribe\Log; use TEC\Common\Monolog\Logger; /** * Class Monolog_Logger * * @since 4.9.16 * * @package Tribe\Log */ class Monolog_Logger extends Logger { /** * @since 4.9.16 */ const DEFAULT_CHANNEL = 'default'; /** * Resets the global channel to the default one. * * @since 4.9.16 * * @return bool Whether the channel reset */ public function reset_global_channel() { return $this->set_global_channel( static::DEFAULT_CHANNEL ); } /** * Clones this logger and replaces it in the `tribe` container. * * @since 4.9.16 * * @param string $channel The new logger name, also referred to as "channel" (hence the method name). * * @return bool Whether the channel change was successful or not. */ public function set_global_channel( $channel ) { $new = $this->withName( $channel ); tribe_register( Logger::class, $new ); tribe_register( 'monolog', $new ); return $channel === tribe( 'monolog' )->getName(); } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件