toMap method
Returns a map representation of this log event. Useful for structured logging systems.
Implementation
Map<String, dynamic> toMap() {
return {
'title': title,
'level': level.name,
if (exception != null) 'exception': exception.toString(),
if (stackTrace != null) 'stackTrace': stackTrace.toString(),
};
}