Skip to content

logging: provide LogRecord formatting #12030

@DartBot

Description

@DartBot

This issue was originally filed by @seaneagan


The logging package should provide support for converting LogRecords into Strings.

In Java's logback these are called Layouts:

http://logback.qos.ch/manual/layouts.html

For example:

class LogFormat {
  String format(LogRecord record);
}

Then can use it like so:

logger.onRecord.map(logFormat.format)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-pkgUsed for miscellaneous pkg/ packages not associated with specific area- teams.type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions