mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-15 15:30:16 +02:00
Add comment to local describing how to change logger level. Also update docs to be consistent with this change.
This commit is contained in:
parent
2d64ee5e2a
commit
6c275d4cd2
@ -22,6 +22,10 @@ INSTALLED_APPS += [
|
|||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# To change the logging level for extensions, uncomment the following line.
|
||||||
|
# LOGGING['handlers']['extension_file']['level'] = 'INFO'
|
||||||
|
|
||||||
|
|
||||||
# Enter credentials to use MySQL/MariaDB. Comment out to use sqlite3
|
# Enter credentials to use MySQL/MariaDB. Comment out to use sqlite3
|
||||||
DATABASES['default'] = {
|
DATABASES['default'] = {
|
||||||
'ENGINE': 'django.db.backends.mysql',
|
'ENGINE': 'django.db.backends.mysql',
|
||||||
|
@ -12,4 +12,22 @@ logger = get_extension_logger(__name__)
|
|||||||
```
|
```
|
||||||
|
|
||||||
This works by creating a child logger of the extension logger which propagates all log entries
|
This works by creating a child logger of the extension logger which propagates all log entries
|
||||||
to the parent (extensions) logger.
|
to the parent (extensions) logger.
|
||||||
|
|
||||||
|
## Changing the Logging Level
|
||||||
|
By default, the extension logger's level is set to `DEBUG`.
|
||||||
|
To change this, uncomment (or add) the following line in `local.py`.
|
||||||
|
|
||||||
|
```python
|
||||||
|
LOGGING['handlers']['extension_file']['level'] = 'INFO'
|
||||||
|
```
|
||||||
|
*(Remember to restart your supervisor workers after changes to `local.py`)*
|
||||||
|
|
||||||
|
This will change the logger's level to the level you define.
|
||||||
|
|
||||||
|
Options are: *(all options accept entries of levels listed below them)*
|
||||||
|
* `DEBUG`
|
||||||
|
* `INFO`
|
||||||
|
* `WARNING`
|
||||||
|
* `ERROR`
|
||||||
|
* `CRITICAL`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user