dart-drivers / mysql

MySQL Connector for Dart
Other
99 stars 38 forks source link

Logging level #46

Open dglinyanov opened 10 years ago

dglinyanov commented 10 years ago

For some reason logging level for messages like "Running query: ..." is set to INFO. Is this behavior intentional? If no, could you fix it, please, or maybe I could create pull request.

hoylen commented 8 years ago

I agree.

The default logging level for the Dart logging package is INFO. Therefore, the sqljocky package should design its log messages for that to be the default level used by an application that uses it.

Since applications that use sqljocky don't want their logs to be filled up with low level entries about every SQL query made, sqljocky should have almost no log messages at the INFO level. It should use higher levels for important things (e.g. WARNING). And it should use lower levels for when the application asks for them debugging what is happening at the SQL level (e.g. FINE, FINER, FINEST). That is, the logging levels should be designed to be useful from the application's point of view.

Name of loggers

Also, the names of the loggers should have a common prefix, so that the logging package's hierarchical logging mechanism can be used.

These are the names of the loggers being used (extracted using a recursive grep) appear to be:

They should be changed to something like, "sqljocky.AuthHandler", "sqljocky.Buffer", etc.

This also makes the logging more compatible with other loggers the application or other packages might be using.