Add centralized logger.#1031
Merged
guzman-raphael merged 17 commits intodatajoint:masterfrom Jun 13, 2022
Merged
Conversation
Contributor
|
Suggesting the logging related to transaction to be set at DEBUG level datajoint-python/datajoint/connection.py Line 383 in 0ff34f2 datajoint-python/datajoint/connection.py Line 391 in 0ff34f2 datajoint-python/datajoint/connection.py Line 400 in 0ff34f2 |
Contributor
Author
|
Yes, this makes sense I will do that. @ttngu207 |
guzman-raphael
requested changes
Jun 10, 2022
Collaborator
guzman-raphael
left a comment
There was a problem hiding this comment.
@jverswijver Great work! 💪
Mostly ready just offering further improvements.
dimitri-yatsenko
approved these changes
Jun 13, 2022
guzman-raphael
approved these changes
Jun 13, 2022
Collaborator
guzman-raphael
left a comment
There was a problem hiding this comment.
@jverswijver Nice work! 🤝
datajoint/autopopulate.py
Outdated
| msg=": " + str(error) if str(error) else "", | ||
| ) | ||
| logger.debug( | ||
| f"Error making {key} -> {self.target.table_name} - {error_message}" |
Member
There was a problem hiding this comment.
I think table_name does not include the schema name whereas full_table_name does.
Suggested change
| f"Error making {key} -> {self.target.table_name} - {error_message}" | |
| f"Error making {key} -> {self.target.full_table_name} - {error_message}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a package level logger for the datajoint package.
Should accomplish the following:
- [ ] Evaluate log DB table to see if logging needs to be addedAdditional functionality requested by data science team:
- [ ] log warnings when user calls populate on emptykey_source- [ ] debug level logging for any insert/deleteExample for capturing the log output but maintaining dj logging
See the converted test
test_limit_warningin the PR.Basically you add a handler to the logger that sends all logs to a StringIO object and then retrieve the string from the object, then you remove the handler.