WP_CLI::log
Display informational message without prefix.
Message is written to STDOUT, or discarded when --quiet flag is supplied.
# `wp cli update` lets user know of each step in the update process. WP_CLI::log( sprintf( 'Downloading from %s...', $download_url ) );
Method of the class: WP_CLI{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = WP_CLI::log( $message );
- $message(string) (required)
- Message to write to STDOUT.
WP_CLI::log() WP CLI::log code WP-CLI 2.13.0-alpha
public static function log( $message ) {
if ( null === self::$logger ) {
return;
}
self::$logger->info( $message );
}