log top-level property

Logger get log

Logger for use by a builder to log to the main build_runner output.

build_runner distinguishes three categories of log record:

Below Level.WARNING is called "info".

Info is only shown if --verbose was explicitly requested on the command line.

At Level.WARNING but below Level.SEVERE is called a "warning".

Warnings are always shown, and the final build status will indicate that the build completed with warnings.

At or above Level.SEVERE is an "error".

Errors signal that the build step has failed: build steps that depend on the outputs will not run, and the build status will say the build failed.

If a builder throws an exception then it is logged as an error.

Implementation

Logger get log => Zone.current[logKey] as Logger? ?? _default;