#author("2023-03-25T14:16:59+09:00","default:irrp","irrp") →Python関連Tips #contents *一般 [#a4830e0c] -[[[Python] loggingモジュールでLEVEL毎にファイルの出力先を変更しrotationさせる方法 | DevelopersIO>https://dev.classmethod.jp/articles/how-to-change-the-output-destination-of-a-file-for-each-level-in-the-python-logging-module-and-rotate-it/]] 2023.3 -[[Python のロギングを完全に理解する - Qiita>https://qiita.com/smats-rd/items/c5f4345aca3a452041c7]] 2022.12 -[[【Python】ロガーでロギングするコード例【logging】 | シラベルノート>https://srbrnote.work/archives/6724#toc4]] 2022.3 新しく Python プログラムを書き始めるときのロガーの使い方です。 ルートロガーのロギングレベルを下げます。 ルートロガーにハンドラを追加します。 名前付きロガーやルートロガーにログを書きます。 -[[Python の logging について - Qiita>https://qiita.com/kitsuyui/items/5a7484a09eeacb564649]] 2018 --階層の一番上、ルートロガー -[[pythonでlogging.Loggerとlogging.LoggerAdapterを許す型を定義する方法のメモ - podhmo's diary>https://pod.hatenablog.com/entry/2019/09/23/174945]] 2019 -[[Pythonでprintを卒業してログ出力をいい感じにする - Qiita>https://qiita.com/FukuharaYohei/items/92795107032c8c0bfd19]] 2019 -[[【Python入門】loggingモジュールで処理の記録を残してみよう! | 侍エンジニアブログ>https://www.sejuku.net/blog/23149]] 2017 -[[pythonのloggingモジュールの呼び出し元のファイル名:行番号を出力する機能が残念という話 - podhmo's diary>https://pod.hatenablog.com/entry/2016/09/22/044109]] 2016 -[[ログ出力のための print と import logging はやめてほしい - Qiita>https://qiita.com/amedama/items/b856b2f30c2f38665701]] 2014 --loggingモジュール直下の logging.debug() や logging.info() などはルートロガーを無条件に呼んでしまうのでよろしくない --[[loggingに関する考え方、その後 - Qiita>https://qiita.com/amedama/items/e9db112719eac1bc2012]] 2020 -[[pythonのlogをコンソールとファイル両方に出力する - Qiita>https://qiita.com/Galvalume29/items/835b65cddaf094c2b3c2]] 2021 -[[Python Logging Best Practices ~ Pieces of Mind>https://pieces.openpolitics.com/2012/04/python-logging-best-practices/]] 2012 *入門系 [#f999af4f] -[[Logging HOWTO — Python 3.11.0b5 ドキュメント>https://docs.python.org/ja/3/howto/logging.html]]