JsonLogRecordParser class

Deserializes a json-encoded LogRecord.

Valid input example:

{"level":{"value":1000,"name":"SEVERE"},"message":"Hello world","object":{"Name":"John","Age":42},"loggerName":"PrettyLogger","time":"2021-12-26T13:34:39.700","sequenceNumber":2,"error":"Something went wrong while fetching profile","stackTrace":"Error\n    at Object.StackTrace_current (<anonymous>:2671:40)\n    at main (<anonymous>:2824:501)\n    at <anonymous>:3896:7\n    at <anonymous>:3879:7\n    at dartProgram (<anonymous>:3890:5)\n    at <anonymous>:3898:3\n    at replaceJavaScript (https://dartpad.dev/scripts/frame.js:19:19)\n    at messageHandler (https://dartpad.dev/scripts/frame.js:140:13)"}
Inheritance

Constructors

JsonLogRecordParser()
Constructs a new JsonLogRecordParser.
const

Properties

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(String value) LogRecord
Calls parse.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(String value) LogRecord
Deserializes a json encoded LogRecord.
override
parseLevel(dynamic value) Level
Parses value to Level.
parseList(String value) Iterable<LogRecord>
Deserializes a json encoded List of LogRecord.
override
parseMap(Map<String, dynamic> map) LogRecord
Parses a Map to a LogRecord
toString() String
A string representation of this object.
inherited

Operators

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