LogBuilder class

A utility class for building structured logs with tags.

Constructors

LogBuilder(String tag)
Creates a new instance of LogBuilder with the specified tag.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tag String
final

Methods

attach(String name, dynamic value) LogBuilder
Attaches a name-value pair to the log.
attachEnd(String name, dynamic value) LogBuilder
Attaches the final name-value pair to the log and ends the attachment section.
attachStart(String name) LogBuilder
Starts a new attachment section with the specified name.
build() → void
Builds and logs the constructed log.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(String name, dynamic value) LogBuilder
Puts a name-value pair directly into the log.
puts(String name, List? data) LogBuilder
Puts a name and a list of data directly into the log.
setAttachSeparator(String separator) LogBuilder
Sets the separator used for attaching name-value pairs.
setLineBreak(String lineBreak) LogBuilder
Sets the line break used in the log.
setPutSeparator(String separator) LogBuilder
Sets the separator used for putting name-value pairs.
setStartingSign(String sign) LogBuilder
Sets the starting sign for each log entry.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getInstance(String tag) LogBuilder
Gets an instance of LogBuilder with the specified tag.