Skip to content

Too many log entries per single error when using external logging #1325

@mkobuolys

Description

@mkobuolys

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).
Screenshot 2022-09-08 at 09 56 07

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

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions