... うにビュー関数を使用してください。 First, import the Python logging library, and then obtain a logger instance with logging.getLogger() . Provide the getLogger() method with a name to identify it and the records it emits. A good option is to use __name__ ( ... more on this) which will provide the name of the current Python module as a dotted path: import logging logger = logging . getLogger ( __name__ ) この宣言はモジュール・レベルで行うのがよいとされています。 そして、ビューなどの関数内で、logger にレコードを送 ... 。名前付きロギング設定は、一致する名前のロガーからだけログを取得します。 The namespace of a logger instance is defined using getLogger() . For example in views.py of my_app : logger = logging . getLogger ( __name__ ) これは my_app.views 名前空間にロガーを作 ... ... うにビュー関数を使用してください。 First, import the Python logging library, and then obtain a logger instance with logging.getLogger() . Provide the getLogger() method with a name to identify it and the records it emits. A good option is to use __name__ ( ... more on this) which will provide the name of the current Python module as a dotted path: import logging logger = logging . getLogger ( __name__ ) この宣言はモジュール・レベルで行うのがよいとされています。 そして、ビューなどの関数内で、logger にレコードを送 ... 。名前付きロギング設定は、一致する名前のロガーからだけログを取得します。 The namespace of a logger instance is defined using getLogger() . For example in views.py of my_app : logger = logging . getLogger ( __name__ ) これは my_app.views 名前空間にロガーを作 ... ... t when defining it: import logging from django.core.mail import send_mail from django.tasks import task logger = logging . getLogger ( __name__ ) @task ( takes_context = True ) def email_users ( context , emails , subject , message ): logger . debug ( f " ... ... t when defining it: import logging from django.core.mail import send_mail from django.tasks import task logger = logging . getLogger ( __name__ ) @task ( takes_context = True ) def email_users ( context , emails , subject , message ): logger . debug ( f " ... 2026年10月08日