Closed leohahn closed 1 year ago
@techoner @Nekotoxin
Yes, but this variable is not used anywhere. I tried setting this to true but nothing changes for logging. Where is this variable used?
@BustDot
@leohahn You can control the log by setting logging config in settings.py. You can refer to django docs. Here is an example to log info and upper level message to console:
# settings.py
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"formatters": {
"casbin_formatter": {
"format": "{asctime} {message}",
"style": "{",
}
},
"handlers": {
"console": {
"level": "INFO",
"class": "logging.StreamHandler",
"formatter": "casbin_formatter",
},
},
"loggers": {
"casbin_adapter": {
"handlers": ["console"],
"level": "INFO",
},
},
}
Adding
does not work. Looking into the code the setting is not passed to the constructor. That seems to be a bug right?