handleLogEvent method
void
handleLogEvent(
- Map logEvent
)
Implementation
void handleLogEvent(Map<dynamic, dynamic> logEvent) {
//int? executionId = logEvent['executionId'];
//int level = logEvent['level'];
String? message = logEvent['message'];
if (message != null && message.isNotEmpty) {
// Logger ALREADY ADDS A NEW LINE. SO REMOVE THE EXISTING ONE
if (message.endsWith('\n')) {
if (message.length > 1) {
logger.v(message.substring(0, message.length - 1));
}
} else {
logger.v(message);
}
}
//logger.v(message); // logger.log(Level.values[level], message); // Not good. We should do a translation of the level. TODO
/*
if (logCallback == null) {
if (message!.isEmpty) {
// ALREADY ADDS A NEW LINE. SO REMOVE THE EXISTING ONE
if (message.endsWith('\n')) {
logger.i(message.substring(0, message.length - 1));
} else {
logger.i(message);
}
}
} else {
logCallback!(FlutterSoundLog(executionId, level, message));
}
*/
}