src/Controller.php
public function use_default_handler( HandlerInterface $handler = NULL ) {

		static $done = FALSE;
		if ( $done ) {
			return $this;
		}

		$done = TRUE;

		add_action(
			HandlersRegistry::ACTION_REGISTER,
			function ( HandlersRegistry $registry ) use ( $handler ) {

				$handler = DefaultHandlerFactory::with_default_handler( $handler )
					->create_default_handler();

				$registry->add_handler( $handler, HandlersRegistry::DEFAULT_NAME );
			},
			1
		);

		return $this;
	}
public function use_default_handler( HandlerInterface $handler = NULL ) {

		static $done = FALSE;
		if ( $done ) {
			return $this;
		}

		$done = TRUE;

		add_action(
			HandlersRegistry::ACTION_REGISTER,
			function ( HandlersRegistry $registry ) use ( $handler ) {

				$handler = DefaultHandlerFactory::with_default_handler( $handler )
					->create_default_handler();

				$registry->add_handler( $handler, HandlersRegistry::DEFAULT_NAME );
			},
			1
		);

		return $this;
	}
public function use_default_handler ( HandlerInterface $ handler = NULL ) { static $ done = FALSE ; if ( $ done ) { return $ this ; } $ done = TRUE ; add_action ( HandlersRegistry :: ACTION_REGISTER , function ( HandlersRegistry $ registry ) use ( $ handler ) { $ handler = DefaultHandlerFactory :: with_default_handler ( $ handler ) -> create_default_handler ( ) ; $ registry -> add_handler ( $ handler , HandlersRegistry :: DEFAULT_NAME ) ; } , 1 ) ; return $ this ; }
Tell Wonolog to use a default handler that can be passed as argument or build using settings customizable via
hooks.

@param HandlerInterface $handler

@return Controller
Tell Wonolog to use a default handler that can be passed as argument or build using settings customizable via hooks .