... G が False のとき: django ロガーは、 django ヒエラルキー ( django.server を除く) において、 ERROR ないし CRITICAL レベルを AdminEmailHandler に送信します。 DEBUG の値にかかわらず: django.server ロガーは INFO レベル以上のメッセージをコンソールに送信します。 django ... ango.server" , }, "mail_admins" : { "level" : "ERROR" , "filters" : [ "require_debug_false" ], "class" : "django.utils.log.AdminEmailHandler" , }, }, "loggers" : { "django" : { "handlers" : [ "console" , "mail_admins" ], "level" : "INFO" , }, "django.server" : { ... れます。 ハンドラ ¶ Django は、 Pythonのモジュールによって提供されるもの に加えて、1つのログハンドラを提供しています。 class AdminEmailHandler ( include_html = False , email_backend = None , reporter_class = None , using = None ) [ソース] ¶ このハンドラは、受け取っ ... ... G が False のとき: django ロガーは、 django ヒエラルキー ( django.server を除く) において、 ERROR ないし CRITICAL レベルを AdminEmailHandler に送信します。 DEBUG の値にかかわらず: django.server ロガーは INFO レベル以上のメッセージをコンソールに送信します。 django ... ango.server" , }, "mail_admins" : { "level" : "ERROR" , "filters" : [ "require_debug_false" ], "class" : "django.utils.log.AdminEmailHandler" , }, }, "loggers" : { "django" : { "handlers" : [ "console" , "mail_admins" ], "level" : "INFO" , }, "django.server" : { ... れます。 ハンドラ ¶ Django は、 Pythonのモジュールによって提供されるもの に加えて、1つのログハンドラを提供しています。 class AdminEmailHandler ( include_html = False , email_backend = None , reporter_class = None , using = None ) [ソース] ¶ このハンドラは、受け取っ ... ... onnection arguments Replacing fail_silently Migrating custom email backends Replacing auth_user and auth_password Updating AdminEmailHandler email_backend Ignoring transient failures in error reporting バージョン 6.1 で非推奨: The following settings and functions ... Message.send() The auth_user and auth_password arguments to send_mail() and send_mass_mail() The email_backend argument to AdminEmailHandler Migrating settings ¶ Often, the only change needed to migrate to mailers is updating email-related settings. In your proje ... call. Calls with fail_silently=False should be updated to remove the fail_silently arg, as that is the default. If you use AdminEmailHandler or BrokenLinkEmailsMiddleware and rely on their previous fail-silent behavior, see Ignoring transient failures in error re ... ... onnection arguments Replacing fail_silently Migrating custom email backends Replacing auth_user and auth_password Updating AdminEmailHandler email_backend Ignoring transient failures in error reporting バージョン 6.1 で非推奨: The following settings and functions ... Message.send() The auth_user and auth_password arguments to send_mail() and send_mass_mail() The email_backend argument to AdminEmailHandler Migrating settings ¶ Often, the only change needed to migrate to mailers is updating email-related settings. In your proje ... call. Calls with fail_silently=False should be updated to remove the fail_silently arg, as that is the default. If you use AdminEmailHandler or BrokenLinkEmailsMiddleware and rely on their previous fail-silent behavior, see Ignoring transient failures in error re ... ... からフィルタリングするように明示的に指定できます。その方法については エラーレポートをフィルタリングする を参照してください。 AdminEmailHandler ¶ 組み込みの AdminEmailHandler はセキュリティの文脈で言及に値します。もし include_html オプションが有効なら、送信するメール ... : "logging.StreamHandler" , "formatter" : "simple" , }, "mail_admins" : { "level" : "ERROR" , "class" : "django.utils.log.AdminEmailHandler" , "filters" : [ "special" ], }, }, "loggers" : { "django" : { "handlers" : [ "console" ], "propagate" : True , }, "django ... フォーマットを使用します。 mail_admins は、 ERROR (またはそれより上) のすべてのメッセージをサイトの ADMINS にメール送信する AdminEmailHandler クラスです。このハンドラは special フィルタを使用します。 3 つのロガーを設定します: django は、すべてのメッセージを consol ... ... からフィルタリングするように明示的に指定できます。その方法については エラーレポートをフィルタリングする を参照してください。 AdminEmailHandler ¶ 組み込みの AdminEmailHandler はセキュリティの文脈で言及に値します。もし include_html オプションが有効なら、送信するメール ... : "logging.StreamHandler" , "formatter" : "simple" , }, "mail_admins" : { "level" : "ERROR" , "class" : "django.utils.log.AdminEmailHandler" , "filters" : [ "special" ], }, }, "loggers" : { "django" : { "handlers" : [ "console" ], "propagate" : True , }, "django ... フォーマットを使用します。 mail_admins は、 ERROR (またはそれより上) のすべてのメッセージをサイトの ADMINS にメール送信する AdminEmailHandler クラスです。このハンドラは special フィルタを使用します。 3 つのロガーを設定します: django は、すべてのメッセージを consol ... ... edFile retain the previous behavior of evaluating based on the name attribute. The undocumented connection() method of log.AdminEmailHandler has been removed and is no longer called. Subclasses overriding AdminEmailHandler.send_mail() should avoid calling connect ... hod of expressions , is deprecated in favor of the newly introduced quote_name() method. The email_backend argument of log.AdminEmailHandler is deprecated in favor of the newly introduced using argument. See Updating AdminEmailHandler email_backend for details. T ... ... edFile retain the previous behavior of evaluating based on the name attribute. The undocumented connection() method of log.AdminEmailHandler has been removed and is no longer called. Subclasses overriding AdminEmailHandler.send_mail() should avoid calling connect ... hod of expressions , is deprecated in favor of the newly introduced quote_name() method. The email_backend argument of log.AdminEmailHandler is deprecated in favor of the newly introduced using argument. See Updating AdminEmailHandler email_backend for details. T ... ... logged ¶ When we added logging support in Django in 1.3, the admin error email support was moved into the django.utils.log.AdminEmailHandler , attached to the 'django.request' logger. In order to maintain the established behavior of error emails, the 'django.requ ... alue of DEBUG , and the default settings file for new projects now includes a separate filter attached to django.utils.log.AdminEmailHandler to prevent admin error emails in DEBUG mode: LOGGING = { # ... "filters" : { "require_debug_false" : { "()" : "django.util ... }, "handlers" : { "mail_admins" : { "level" : "ERROR" , "filters" : [ "require_debug_false" ], "class" : "django.utils.log.AdminEmailHandler" , } }, } If your project was created prior to this change, your LOGGING setting will not include this new filter. In orde ... ... sidered a security issue because admindocs is only accessible to staff users ( #23601 ). Fixed UnicodeDecodeError crash in AdminEmailHandler with non-ASCII characters in the request ( #23593 ). Fixed missing get_or_create and update_or_create on related managers ... 2026年10月08日