Monolog_Logger::set_global_channel( string $channel )

Clones this logger and replaces it in the tribe container.


Parameters

$channel

(string) (Required) The new logger name, also referred to as "channel" (hence the method name).


Top ↑

Return

(bool) Whether the channel change was successful or not.


Top ↑

Source

File: src/Tribe/Log/Monolog_Logger.php

	public function set_global_channel( $channel ) {
		$new = $this->withName( $channel );
		tribe_register( Logger::class, $new );
		tribe_register( 'monolog', $new );

		return $channel === tribe( 'monolog' )->getName();
	}

Top ↑

Changelog

Changelog
Version Description
4.9.16 Introduced.