Skip to content

Commit d229df1

Browse files
committed
feat: added option to set gunicorn accesslogs and errorlogs
1 parent e3cb127 commit d229df1

5 files changed

Lines changed: 15 additions & 0 deletions

File tree

services/dect-wip-mitel-phonebook/gunicorn.conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66
# starting gunicorn config here
77

88
bind = f'{_config.mitelphonebook_listen_ip}:{_config.mitelphonebook_port}'
9+
accesslog = _config.gunicorn_accesslogfile
10+
errorlog = _config.gunicorn_errorlogfile

services/dect-wip-ommsync/gunicorn.conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66
# starting gunicorn config here
77

88
bind = f'{_config.ommsync_listen_ip}:{_config.ommsync_port}'
9+
accesslog = _config.gunicorn_accesslogfile
10+
errorlog = _config.gunicorn_errorlogfile

services/dect-wip/gunicorn.conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66
# starting gunicorn config here
77

88
bind = f'{_config.dect_wip_listen_ip}:{_config.dect_wip_port}'
9+
accesslog = _config.gunicorn_accesslogfile
10+
errorlog = _config.gunicorn_errorlogfile

systemfiles/etc/dect-wip.ini.sample

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
[gunicorn]
2+
# - is stdout
3+
accesslogfile = -
4+
errorlogfile = -
5+
16
[flask]
27
# LEAVE EMPTY dect-wip generates secret key on first startup
38
secret_key =

tools/confighelper.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ def __init__(self, config_path = '/etc/dect-wip.ini'):
2929

3030
self.config.read(config_path)
3131

32+
# [gunicorn]
33+
self.gunicorn_accesslogfile = self.__get_config_with_env_override('gunicorn', 'accesslogfile')
34+
self.gunicorn_errorlogfile = self.__get_config_with_env_override('gunicorn', 'errorlogfile')
35+
3236
# [Asterisk]
3337
self.asterisk_pjsip_wizard_user_conf = self.__get_config_with_env_override('asterisk', 'pjsip_wizard_user_conf')
3438
self.asterisk_pjsip_wizard_temp_conf = self.__get_config_with_env_override('asterisk', 'pjsip_wizard_temp_conf')

0 commit comments

Comments
 (0)