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

Logging level #46

Open
dglinyanov opened this issue Jul 28, 2014 · 1 comment
Open

Logging level #46

dglinyanov opened this issue Jul 28, 2014 · 1 comment

Comments

@dglinyanov
Copy link

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
Copy link

hoylen commented Apr 6, 2016

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:

  • AuthHandler
  • BinaryDataPacket
  • Buffer
  • BufferedSocket
  • CloseStatementHandler
  • Connection
  • ConnectionPool
  • DebugHandler
  • ExecuteQueryHandler
  • HandshakeHandler
  • PingHandler
  • PrepareHandler
  • Query
  • QueryStreamHandler
  • QuitHandler
  • ResultSetHeaderPacket
  • SSLHandler
  • UseDbHandler

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.

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

2 participants