-
Notifications
You must be signed in to change notification settings - Fork 63
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
Add logger #1328
Add logger #1328
Conversation
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.
LGTM.
Just one question, how would a user of CARTOframes change the log level? Maybe we could document that in some place.
Using the |
Sorry I meant a different thing. Loggers allow to set the log level, so at runtime you decide if you want more verbose logs or not. For example, now is set to INFO so I assume debug logs are not shown by default. As a user of CARTOframes how can I see the debug logs or only warnings and errors or in other words how can I set the log level? |
Yes, that's the goal of those functions :). We might improve the naming: UPDATE: 4156780 |
sorry I misread them 🤦♂ the name change would help, thanks! |
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.
A detail. As a user, I would expect to have access to the log (since it is the Python logger) and set the level by myself, or even customizing how the log looks like.
For example, I could see all the CARTOframes logs doing:
from cartoframes.whatever.the.log.is import log
import logging
log.setLevel(logging.DEBUG)
Acceptance 🍏 @Jesus89 not sure if you want to include the requested changes by @oleurud in this PR or in a different one. |
Forget it. You could access to it by:
I confused myself due to the function |
Cool, let's use this as much as possible :) |
Closes #422.
NOTE: this is the output of the logger, we can customize the message:
@cmongut do you think we need to change this (remove time, log level, etc)?