Merged
Conversation
fd45968 to
3af8c91
Compare
Member
|
Hi @shblhy , I see in 2nd commit, you have reverted back your change of 1st commit. You can just merge these 2 commits into one. So I can clearly see what has been changed in the whole PR. |
leeqvip
suggested changes
Jul 4, 2019
casbin/log/log.py
Outdated
| """sets the current logger.""" | ||
| logger = l | ||
|
|
||
| logger.logger =l |
Member
There was a problem hiding this comment.
set_logger should set the logger under the package, not the DefaultLogger.
This should refer to the Golang version of casbin.
casbin/log/default_logger.py
Outdated
| fmt = "%(asctime)s - %(levelname)s - %(message)s" | ||
| formatter = logging.Formatter(fmt) | ||
| handler.setFormatter(formatter) | ||
| self.logger.addHandler(handler) No newline at end of file |
Member
There was a problem hiding this comment.
There is no need to set_logger here.
In __init__, you can create a custom logger directly, so that it will not affect the global log configuration.
43cf227 to
e6bb423
Compare
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.
import casbin changed logging basic config, which is not excepted.
Fix: #17