跳转到主要内容

WP_CLI::log()

Display informational message without prefix.


Usage

WP_CLI::log( $message, $newline = true )
$message (string) Message to write to STDOUT.
$newline (bool) Optional. Whether to append a newline to the end of the message. Default true.
@return (void)

Notes

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 ) );

Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.