TextFormatter class final
TextFormatter is used to encode Record to formatted string.
- Mixed-in types
Constructors
-
TextFormatter(FormatHandler format, {LevelFormatter<
String> formatLevel = _formatLevel, TimestampFormatter<String> formatTimestamp = _formatTimestamp}) -
Creates a new TextFormatter instance with
format
callback used to composite the final logging message. - TextFormatter.withDefaults()
-
Creates a new TextFormatter with set
format
callback.factory
Properties
- format → FormatHandler
-
final
-
formatLevel
→ LevelFormatter<
String> -
final
-
formatTimestamp
→ TimestampFormatter<
String> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
Record record) → List< int> -
Encodes given
record
to formatted string. -
getFieldFormatter(
FieldKind kind) → FieldFormatter< String> -
Returns registered formatter for a give field
kind
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setFieldFormatter(
FieldKind kind, FieldFormatter< String> formatter) → void -
Registers
formatter
for a given fieldkind
.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited