mirror of
https://codeberg.org/prof_x_pvt_ltd/captive.whump.shanti-portal
synced 2024-08-14 22:46:42 +00:00
fixing some config issues with plugins.
This commit is contained in:
parent
4271143896
commit
972140afe4
4 changed files with 13 additions and 7 deletions
|
@ -28,13 +28,15 @@ def run(arg):
|
|||
plugin_config = arg['config']
|
||||
|
||||
config = RawConfigParser(defaults=plugin_config)
|
||||
config.add_section(plugin_config.get('__name__', 'iptables'))
|
||||
config.add_section('iptables')
|
||||
config._sections['iptables'] = plugin_config
|
||||
|
||||
# Setup plugin logging
|
||||
l = getLogger('plugin_iptables')
|
||||
l.addHandler(logHandler)
|
||||
if config.getboolean('iptables', 'debug', False):
|
||||
if config.getboolean('iptables', 'debug'):
|
||||
l.setLevel(DEBUG)
|
||||
l.debug('debug logging enabled')
|
||||
|
||||
client_ip = environ.get(
|
||||
'HTTP_X_FORWARDED_FOR',
|
||||
|
|
|
@ -17,12 +17,14 @@ def run(arg):
|
|||
plugin_config = arg['config']
|
||||
|
||||
config = RawConfigParser(defaults=plugin_config)
|
||||
config.add_section(plugin_config.get('__name__', 'sample_log'))
|
||||
config.add_section('sample_log')
|
||||
config._sections['sample_log'] = plugin_config
|
||||
|
||||
l = getLogger('plugin_log')
|
||||
l.addHandler(logHandler)
|
||||
if config.getboolean('sample_log', 'debug', False):
|
||||
l.setLevel(DEBUG)
|
||||
l.debug('debug logging enabled')
|
||||
|
||||
log_url = '{proto}://{server}:{port}{request}'.format(
|
||||
proto=environ.get('wsgi.url_scheme'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue