Skip to content

Commit 3d063a4

Browse files
committed
Merge branch 'ryanmerolle-plugins-and-logging' into develop
2 parents d1b70ba + f924e76 commit 3d063a4

File tree

3 files changed

+71
-1
lines changed

3 files changed

+71
-1
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ configuration/*
77
!configuration/configuration.py
88
!configuration/extra.py
99
configuration/ldap/*
10-
!configuration/ldap/ldap_config.py
1110
!configuration/ldap/extra.py
11+
!configuration/ldap/ldap_config.py
12+
!configuration/logging.py
13+
!configuration/plugins.py
1214
prometheus.yml
1315
super-linter.log

configuration/logging.py

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# # Remove first comment(#) on each line to implement this working logging example.
2+
# # Add LOGLEVEL environment variable to netbox if you use this example & want a different log level.
3+
# from os import environ
4+
5+
# # Set LOGLEVEL in netbox.env or docker-compose.overide.yml to override a logging level of INFO.
6+
# LOGLEVEL = environ.get('LOGLEVEL', 'INFO')
7+
8+
# LOGGING = {
9+
10+
# 'version': 1,
11+
# 'disable_existing_loggers': False,
12+
# 'formatters': {
13+
# 'verbose': {
14+
# 'format': '{levelname} {asctime} {module} {process:d} {thread:d} {message}',
15+
# 'style': '{',
16+
# },
17+
# 'simple': {
18+
# 'format': '{levelname} {message}',
19+
# 'style': '{',
20+
# },
21+
# },
22+
# 'filters': {
23+
# 'require_debug_false': {
24+
# '()': 'django.utils.log.RequireDebugFalse',
25+
# },
26+
# },
27+
# 'handlers': {
28+
# 'console': {
29+
# 'level': LOGLEVEL,
30+
# 'filters': ['require_debug_false'],
31+
# 'class': 'logging.StreamHandler',
32+
# 'formatter': 'simple'
33+
# },
34+
# 'mail_admins': {
35+
# 'level': 'ERROR',
36+
# 'class': 'django.utils.log.AdminEmailHandler',
37+
# 'filters': ['require_debug_false']
38+
# }
39+
# },
40+
# 'loggers': {
41+
# 'django': {
42+
# 'handlers': ['console'],
43+
# 'propagate': True,
44+
# },
45+
# 'django.request': {
46+
# 'handlers': ['mail_admins'],
47+
# 'level': 'ERROR',
48+
# 'propagate': False,
49+
# },
50+
# 'django_auth_ldap': {
51+
# 'handlers': ['console',],
52+
# 'level': LOGLEVEL,
53+
# }
54+
# }
55+
# }

configuration/plugins.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Add your plugins and plugin settings here.
2+
# Of course uncomment this file out.
3+
4+
# To learn how to build images with your required plugins
5+
# See https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins
6+
7+
# PLUGINS = ["netbox_bgp"]
8+
9+
# PLUGINS_CONFIG = {
10+
# "netbox_bgp": {
11+
# ADD YOUR SETTINGS HERE
12+
# }
13+
# }

0 commit comments

Comments
 (0)