line method

void line(
  1. String line, {
  2. LogLevel level = cli.LogLevel.info,
})

Line Output Guidelines

Used for line-oriented output that should not be modified or formatted other than each line being appended with a newline. Typical use cases are logs, tables, and line-oriented text data dumps.

Format:

<line of text>

Example:

Fetching logs from oldest to newest. Display time zone: local (CET).
Timestamp                   | Level   | Content
----------------------------+---------+--------
2024-11-26 16:38:44.113541  | INFO    | Webserver listening on port 8082

Implementation

void line(
  final String line, {
  final cli.LogLevel level = cli.LogLevel.info,
}) {
  _logger.log(
    '$line\n',
    level,
    type: cli.RawLogType(),
    newParagraph: false,
  );
}