File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,24 @@ const Symbol logKey = #buildLog;
1010
1111final _default = Logger ('build.fallback' );
1212
13- /// The log instance for the currently running BuildStep .
13+ /// `Logger` for use by a builder to log to the main `build_runner` output .
1414///
15- /// Will be `null` when not running within a build.
15+ /// `build_runner` distinguishes three categories of log record:
16+ ///
17+ /// Below [Level.WARNING] is called "info".
18+ ///
19+ /// Info is only shown if `--verbose` was explicitly requested on the command
20+ /// line.
21+ ///
22+ /// At [Level.WARNING] but below [Level.SEVERE] is called a "warning".
23+ ///
24+ /// Warnings are aways shown, and the final build status will indicate that
25+ /// the build completed with warnings.
26+ ///
27+ /// At or above [Level.SEVERE] is an "error".
28+ ///
29+ /// Errors signal that the build step has failed: build steps that depend on the
30+ /// outputs will not run, and the build status will say the build failed.
31+ ///
32+ /// If a builder throws an exception then it is logged as an error.
1633Logger get log => Zone .current[logKey] as Logger ? ?? _default;
You can’t perform that action at this time.
0 commit comments