jumpserver/terminal/utils.py

20 lines
342 B
Python
Raw Normal View History

2016-09-24 16:21:32 +00:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
2016-09-25 03:30:02 +00:00
#
import logging
2016-09-25 11:53:55 +00:00
from logging.config import dictConfig
from ssh_config import config, env
2016-09-25 03:30:02 +00:00
2016-09-24 16:21:32 +00:00
2016-09-25 11:53:55 +00:00
CONFIG_SSH_SERVER = config.get(env)
def get_logger(name):
dictConfig(CONFIG_SSH_SERVER.LOGGING)
return logging.getLogger('jumpserver.%s' % name)
2016-09-24 16:21:32 +00:00
2016-09-25 15:11:09 +00:00
class SSHServerException(Exception):
pass