stream-chat-flutter
stream-chat-flutter copied to clipboard
Too many log entries per single error when using external logging
Please select which package this feature is related to
stream_chat_flutter
Which platforms would this feature impact?
iOS, Android
Is your feature request related to a problem?
When using external logging, a single stack trace provides too many error entries in the external logging service (this case, DataDog).

Describe the solution that you'd like
It would be nice to enable/disable this pretty logging option to provide the whole error with the stack trace in a single log entry.
Describe alternatives that you have considered
No response
Additional context
This is my Stream chat client setup:
final client = StreamChatClient(
AppConfig.values.streamChat.apiKey,
logLevel: kDebugMode ? Level.INFO : Level.SEVERE,
logHandlerFunction: (record) {
final level = record.level;
if (level > Level.WARNING) {
Log.error(record.error ?? record.message, record.stackTrace);
} else if (level > Level.INFO) {
Log.warning(record.message);
} else {
Log.debug(record.message);
}
},
);
Code of Conduct
- [X] I agree to follow this project's Code of Conduct