WP_CLI

Runner::init_logger()publicWP-CLI 1.0

Method of the class: Runner{}

No Hooks.

Return

null. Nothing.

Usage

$Runner = new Runner();
$Runner->init_logger();

Runner::init_logger() code WP-CLI 2.8.0-alpha

public function init_logger() {
	if ( $this->config['quiet'] ) {
		$logger = new Loggers\Quiet( $this->in_color() );
	} else {
		$logger = new Loggers\Regular( $this->in_color() );
	}

	WP_CLI::set_logger( $logger );
}