0
メッセージ「すべてのジョブの実行」を抑制:スケジュールパッケージ:私は現在のプロジェクトのためのスケジュール」を使用してい
https://pypi.python.org/pypi/schedule
それは素晴らしいことだが、私は「X秒ごとに実行中のジョブ」抑制したいですスケジュールされたタスクが実行されるたびにトリガーされるログメッセージ。私は以下の何を意味するかの例:
これを実現する方法はありますか?
# Define overall logging settings; these log levels/format go to file
logging.basicConfig(level=variables.settings['log_level_file'],
format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
filename='logs\log.log')
# Set up Handlers and Formatters; these log levels/format go to console
console = logging.StreamHandler()
console.setLevel(variables.settings['log_level_console'])
formatter = logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message)s')
console.setFormatter(formatter)
logging.getLogger('').addHandler(console)
githubリポジトリにはこの[問題](https://github.com/dbader/ schedule /issues/30)があります。また、静かな仕事のオプションで[pull request](https://github.com/dbader/schedule/pull/76)があります。 – Meloman
また、この[質問](https://stackoverflow.com/questions/11029717/how-do-i-disable-log-messages-from-the-requests-library)を参照してください。ロガーのレベルを 'logging.DEBUG'に設定したいとします。 – Meloman
素晴らしい、ありがとう@Meloman、仕事を完璧にやった。 – itzafugazi