-
Notifications
You must be signed in to change notification settings - Fork 43
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
INFO to DEBUG log level #819
Conversation
I don't understand the point of changing a lot of these -- many of them are intended to be visible information, not just extra debug information. I think you really just don't want to see logs from the library, not change their level. Maybe we should change the default logger that is set up instead. Python recommends libraries have: As an example where I'd rather not change from INFO to DEBUG, tiling frames can be slow, so logging information every 10 seconds is useful to see that something is progressing. Similarly, the logs in the thumbnail task in Girder effectively vanish if we set them to debug, losing feedback from the job. |
I didn't know about that. I'll see if I can give this PR another go to implement that and make sure the changes are more useful/relevant. We'd need to change all
Somewhat - there are a few that should be changed to an ERROR level rather than INFO but those are minor. It also makes it easier to filter on papertrail to know what truly is DEBUG info vs INFO info vs logged ERRORs |
I just checked, and outside of the Girder packages, we already are exclusively using the logger from the config. In some girder code we are using the girder logger. The converter utility also uses its own logger rather than the general large-image logger. So, no changes needed for that purpose. |
@@ -59,7 +59,7 @@ def createThumbnailsJobTask(item, spec): | |||
except TileGeneralError as exc: | |||
status['failed'] += 1 | |||
status['lastFailed'] = str(item['_id']) | |||
logger.info('Failed to get thumbnail for item %s: %r' % (item['_id'], exc)) | |||
logger.error('Failed to get thumbnail for item %s: %r' % (item['_id'], exc)) |
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 think when imageKey
is present, this should actually do nothing in the exception rather than increment failed and log anything.
Regarding changing some logging to ERROR level -- let's keep that, though I've commented on one log message that sometimes shouldn't occur; if we don't address that on this PR, we should make an issue so it can be addressed separately. |
I think with #840, we should either close this PR without merging, or just reduce it to changing the non-girder log messages that are being promoted to error level (which I think is just one in the gdal source). |
I'm fine just closing this. My qualm was that ANY logs from large-image were being captured by sentry.io for django-large-image. So I just did this to mitigate it: girder/django-large-image@13273f5 |
Resolves #690
This changes most INFO level logs to DEBUG - some were changed to ERROR where I thought appropriate