logFatal method
Use logFatal
to produce a log that represents an irreparable
situation. This level of logs should require your total
attention. In an ideal world, you should never see this type
of logs.
message
is the most important piece of the log, and extras
are attached information that can be added to expand the meaning
and context of your log.
Implementation
@override
void logFatal(String message, [Map<String, String>? extras]) {
final data = _baseData;
data['level'] = 'CRITICAL';
data['message'] = message;
data['extras'] = extras;
data['event'] = <String, dynamic>{
'created': DateTime.now().toIso8601String(),
'type': 'exception',
};
_sendLog(data);
}