-
Notifications
You must be signed in to change notification settings - Fork 959
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
Improve logging #30
Comments
Good suggestion. I think the wording schedule uses currently could be improved. I want to keep the full date around though for last run / next run because sometimes jobs will be scheduled days in advance. |
By the way let me know if you want to put together a pull-request with some of these improvements. |
Schedule is really useful, I like it but, regarding improved logging, one small thing I don't get , using the example below why is next run:17:31:50 actually the time of this run 2014-11-28 17:31:53 .... It would be much more useful to advise when the next actual run would be, like if the example is running every 10 minutes then next run should say 17:41.50 2015-02-13 17:31:53 - INFO - Running job Every 10 minutes do job1() (last run: 2015-02-13 17:21:22, next run: 2015-02-13 17:31:50) Toshi |
Is there a way to disable logging all together? I use logging in my application and these logs (for example the job I run every 5 seconds) interfere a lot. (I've set my log up as a csv file which I can import in an mysql database every day) |
You can set the schedule logger's level manually: logging.getLogger('schedule').setLevel(logging.DEBUG) |
I would like to see more logging added to schedule in general. Currently, the only logs are from
A default logger configuration would also be great to provide the usual logging info (timestamp, level, etc.). I've opened a PR if you're interested: #193 |
Is there an option to disable args/kwargs from being included in the logging messages when jobs run? I would like to include these logging messages in my logs (particularly job frequency, last run, and next run). However; the arguments I'm passing through the scheduler involve sensitive information that I don't want to be stored in plaintext. Optionally removing args/kwargs from the logging would also allow the messages to be more concise. Unfortunately, I'm forced to disable the logger for schedule as a workaround for the time being. Are there any other solutions I'm overlooking without overriding the |
Hi all! Thank you all for the good suggestions. Here is an update on the current state:
On the subject of hiding sensitive information from log messages as raised by @zspatter; I don't think we should add a built-in switch for removing args from the logs as only few people need this and we want to keep this library simple. However, I would very much like to add add a good example of how to implement this in the documentation. We can experiment on the best way to do this: overriding some method or adding a decorator as described here, I'm open to suggestions. To track this, I've created #402 |
Right now we're seeing:
It'd be nice if this would be slightly more concise. Eg.
The text was updated successfully, but these errors were encountered: