mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-07-22 11:59:33 +00:00
Move xmpp module to python logging
This commit is contained in:
parent
eba3021765
commit
6186be4421
@ -5,12 +5,15 @@ from django.template import RequestContext
|
||||
from django.template.loader import render_to_string
|
||||
from django.template.response import TemplateResponse
|
||||
from gettext import gettext as _
|
||||
import logging
|
||||
|
||||
import actions
|
||||
import cfg
|
||||
import service
|
||||
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
||||
SIDE_MENU = {'title': _('XMPP'),
|
||||
'items': [{'url': '/apps/xmpp/configure',
|
||||
'text': 'Configure XMPP Server'},
|
||||
@ -94,7 +97,7 @@ def get_status():
|
||||
|
||||
def _apply_changes(request, old_status, new_status):
|
||||
"""Apply the form changes"""
|
||||
cfg.log.info('Status - %s, %s' % (old_status, new_status))
|
||||
LOGGER.info('Status - %s, %s', old_status, new_status)
|
||||
|
||||
if old_status['inband_enabled'] == new_status['inband_enabled']:
|
||||
messages.info(request, _('Setting unchanged'))
|
||||
@ -107,7 +110,7 @@ def _apply_changes(request, old_status, new_status):
|
||||
messages.success(request, _('Inband registration disabled'))
|
||||
option = 'noinband_enable'
|
||||
|
||||
cfg.log.info('Option - %s' % option)
|
||||
LOGGER.info('Option - %s', option)
|
||||
|
||||
_output, error = actions.superuser_run('xmpp-setup', [option])
|
||||
del _output # Unused
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user