Beispiel #1
0
    def __init__(self, flask_app):
        self.flask_app = flask_app
        self.post_file = PostFile()

        # Configure logging
        log_config_obj = LogCfg()
        logging.config.dictConfig(log_config_obj.config)

        logfile = 'janusserver'
        self.logger = logging.getLogger(logfile)
Beispiel #2
0
    def __init__(self):
        """
        Setup Flask properties
        """
        self.mp_app = None
        self.mp_ws = None

        self.flask_app = Flask(__name__, )
        self.flask_app.debug = True
        self.handler_app = HandlerApp(self.flask_app)
        self.handler_app.handler()

        # Configure logging
        log_config_obj = LogCfg()
        logging.config.dictConfig(log_config_obj.config)

        logfile = 'janusserver'
        self.logger = logging.getLogger(logfile)
Beispiel #3
0
#!/usr/bin/env python3
__author__ = 'Larry A. Hartman'
__company__ = 'Janus Research'

# Initialize Application processes
if __name__ == '__main__':
    import logging
    import logging.config
    from config.core import CoreCfg
    from config.capture import CaptureCfg
    from config.log import LogCfg
    from config.transmit import TransmitCfg
    from crontab import CronTab

    # Configure logging
    log_config_obj = LogCfg()
    logging.config.dictConfig(config=log_config_obj.config)

    # Inject initial empty log entries for easy-to-spot visual markers
    logfile = 'januswm'
    logger = logging.getLogger(name=logfile)
    for i in range(1, 6):
        logger.info(msg='')

    log = 'JanusWM logging started'
    logger.info(msg=log)
    logging.getLogger(name=logfile).setLevel(level=logging.INFO)

    cron_sched = CronTab(user='******')
    cron_sched.remove_all()
    cron_sched.write()