-
Notifications
You must be signed in to change notification settings - Fork 172
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
[v6r21] Clean logs 1 #3991
[v6r21] Clean logs 1 #3991
Conversation
What about also changing the name of the logger to |
I am ok with that policy. But what about loggers inside the classes ? |
824d9f3
to
1c7b8d4
Compare
raise Exception( error ) | ||
if isinstance( attrValue, list ): | ||
retDict = self._escapeValues( attrValue ) | ||
self.log.debug('buildCondition:', error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am OK to change to debug
when it was verbose
but these are warn
. Shouldn't they be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it does not make sense to log it as warning so deep down in the stack. The error is correctly reported to the higher level, and it's up to them to issue the warning
""" | ||
set MySQL connection parameters and try to connect | ||
|
||
:param debug: unused |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be removed then altogether ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have wanted to,but there is no way to "deprecate it" with the decorator as it is now. I will try to find a way fo a further patch release, and we remove it in v7. OK for you ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
if not retDict['OK']: | ||
return retDict | ||
self.log.info( 'Table %s created' % table ) | ||
self.log.debug('Table %s created' % table) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be left at Info. This is only printed at the first service invocation when no tables are there yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be, but does it make sense ? the service anyway prints it if creates table.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If so, then this one can be dropped completely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. If you don't mind, I will do it in the next PR for log cleaning, such that these changes are in the next patch release and can already go in prod next week
This PR is the first one of a looooong serie where I will, as announced, clean the logs. I will do such PR every week.
@atsareg I will build on top of that one, so please always merge this one just before doing the release
BEGINRELEASENOTES
*Core
CHANGE: MySQL class prints only debug logs
ENDRELEASENOTES