NetworkLoggingTree class
NetworkLoggingTree uses TCP or UDP sockets to send log entries to.
Example in terminal: nc -kvl 5601 | grep TheClassName
- Inheritance
-
- Object
- LogTree
- CustomFormatTree
- NetworkLoggingTree
- Implemented types
Constructors
- NetworkLoggingTree.tcp(String server, int port, {Duration timeout = const Duration(seconds: 10)})
-
Creates TCP version of the NetworkLoggingTree
factory
- NetworkLoggingTree.udp(String server, int port, {Duration timeout = const Duration(seconds: 10)})
-
Creates UDP version of the NetworkLoggingTree
factory
Properties
-
colorizeMap
↔ Map<
String, ColorizeStyle> -
Map of log levels and their colorizing style.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isTcpSocket → bool
-
If true it is TCP socket to be used.
final
- logFormat ↔ String
-
Log line format style.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timeout → Duration
-
Connection timeout (used on TCP socket)
final
Methods
-
getLevels(
) → List< String> -
Gets levels of logging serviced by this LogTree
inherited
-
log(
String level, String msg, {String? tag, dynamic ex, StackTrace? stacktrace}) → void -
Logs a message with level/tag and optional stacktrace or exception.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
planted(
) → void -
Called when the tree is planted.
override
-
printLine(
String line, {String? level}) → void -
Prints log line with optional log level.
override
-
printLog(
String logLine, {String? level}) → void -
Method to overload printing to output stream the formatted logline
Adds handing of time
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unplanted(
) → void -
Called when the tree is unrooted.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited