Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too much logging on FINE level. #142

Open
fengzee opened this issue Oct 8, 2022 · 0 comments
Open

Too much logging on FINE level. #142

fengzee opened this issue Oct 8, 2022 · 0 comments

Comments

@fengzee
Copy link

fengzee commented Oct 8, 2022

I noticed this library outputs too much logs with package:logging on FINE level with loggers named "BufferedSocket" and "MySqlConnection". Most log content is about bytes transfered through TCP connection with database.

I would suggest to put these logs to a lower level (eg. FINEST) and make sure not to construct the string when logging of that level is off, as they are really about byte-level details. It would make logging management easier for application developers.

Currently I'm turning off these logs with:

  void _adjustDatabaseLogLevel() {
    // Logs from these loggers are flooding the log buffer.
    // Turn off Level.FINE and below.
    final dbLoggers = [
      'BufferedSocket',
      'MySqlConnection',
      'PrepareHandler',
      'ExecuteQueryHandler',
    ];
    for (var dbLogger in dbLoggers) {
      Logger(dbLogger).level = Level.CONFIG;
    }
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant