Skip to content

Commit a1ae206

Browse files
committed
adds logger
Signed-off-by: Старцев Матвей <tozarin@yandex.ru>
1 parent caf82de commit a1ae206

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

netbox/netbox/configuration.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,21 @@
115115

116116
# Enable custom logging. Please see the Django documentation for detailed guidance on configuring custom logs:
117117
# https://docs.djangoproject.com/en/stable/topics/logging/
118-
LOGGING = {}
118+
LOGGING = {
119+
'version': 1,
120+
'disable_existing_loggers': False,
121+
'handlers': {
122+
'console': {
123+
'class': 'logging.StreamHandler',
124+
},
125+
},
126+
'loggers': {
127+
'netbox.webhooks': {
128+
'handlers': ['console'],
129+
'level': 'INFO',
130+
},
131+
},
132+
}
119133

120134
# Automatically reset the lifetime of a valid session upon each authenticated request. Enables users to remain
121135
# authenticated to NetBox indefinitely.

0 commit comments

Comments
 (0)