Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
b3acdeee
Kaydet (Commit)
b3acdeee
authored
Kas 07, 2015
tarafından
Neal Todd
Kaydeden (comit)
Tim Graham
Kas 18, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
De-emphasized use of NullHandler in logging docs.
NullHandler removed in 1.9; unused since Django 1.5.
üst
0a19f8d4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
19 deletions
+23
-19
logging.txt
docs/topics/logging.txt
+23
-19
No files found.
docs/topics/logging.txt
Dosyayı görüntüle @
b3acdeee
...
@@ -315,15 +315,15 @@ Finally, here's an example of a fairly complex logging setup::
...
@@ -315,15 +315,15 @@ Finally, here's an example of a fairly complex logging setup::
'special': {
'special': {
'()': 'project.logging.SpecialFilter',
'()': 'project.logging.SpecialFilter',
'foo': 'bar',
'foo': 'bar',
}
},
},
'handlers': {
'require_debug_true': {
'null': {
'()': 'django.utils.log.RequireDebugTrue',
'level': 'DEBUG',
'class': 'logging.NullHandler',
},
},
},
'handlers': {
'console': {
'console': {
'level': 'DEBUG',
'level': 'INFO',
'filters': ['require_debug_true'],
'class': 'logging.StreamHandler',
'class': 'logging.StreamHandler',
'formatter': 'simple'
'formatter': 'simple'
},
},
...
@@ -335,9 +335,8 @@ Finally, here's an example of a fairly complex logging setup::
...
@@ -335,9 +335,8 @@ Finally, here's an example of a fairly complex logging setup::
},
},
'loggers': {
'loggers': {
'django': {
'django': {
'handlers': ['
null
'],
'handlers': ['
console
'],
'propagate': True,
'propagate': True,
'level': 'INFO',
},
},
'django.request': {
'django.request': {
'handlers': ['mail_admins'],
'handlers': ['mail_admins'],
...
@@ -371,17 +370,18 @@ This logging configuration does the following things:
...
@@ -371,17 +370,18 @@ This logging configuration does the following things:
message, plus the time, process, thread and module that
message, plus the time, process, thread and module that
generate the log message.
generate the log message.
* Defines one filter -- ``project.logging.SpecialFilter``,
* Defines two filters:
using the alias ``special``. If this filter required additional
arguments at time of construction, they can be provided as
additional keys in the filter configuration dictionary. In this
case, the argument ``foo`` will be given a value of ``bar`` when
instantiating the ``SpecialFilter``.
* Defines three handlers:
* ``project.logging.SpecialFilter``, using the alias ``special``. If this
filter required additional arguments, they can be provided as additional
keys in the filter configuration dictionary. In this case, the argument
``foo`` will be given a value of ``bar`` when instantiating
``SpecialFilter``.
* ``null``, a NullHandler, which will pass any ``DEBUG`` (or
* ``django.utils.log.RequireDebugTrue``, which passes on records when
higher) message to ``/dev/null``.
:setting:`DEBUG` is ``True``.
* Defines two handlers:
* ``console``, a StreamHandler, which will print any ``DEBUG``
* ``console``, a StreamHandler, which will print any ``DEBUG``
(or higher) message to stderr. This handler uses the ``simple`` output
(or higher) message to stderr. This handler uses the ``simple`` output
...
@@ -393,8 +393,7 @@ This logging configuration does the following things:
...
@@ -393,8 +393,7 @@ This logging configuration does the following things:
* Configures three loggers:
* Configures three loggers:
* ``django``, which passes all messages at ``INFO`` or higher
* ``django``, which passes all messages to the ``console`` handler.
to the ``null`` handler.
* ``django.request``, which passes all ``ERROR`` messages to
* ``django.request``, which passes all ``ERROR`` messages to
the ``mail_admins`` handler. In addition, this logger is
the ``mail_admins`` handler. In addition, this logger is
...
@@ -546,6 +545,11 @@ specific logger following this example:
...
@@ -546,6 +545,11 @@ specific logger following this example:
.. code-block:: python
.. code-block:: python
'handlers': {
'null': {
'class': 'logging.NullHandler',
},
},
'loggers': {
'loggers': {
'django.security.DisallowedHost': {
'django.security.DisallowedHost': {
'handlers': ['null'],
'handlers': ['null'],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment