コード例 #1
0
ファイル: browser.py プロジェクト: WaltersArtMuseum/stele
def main():
    """Launch the browser and run checks """

    stele_dir = get_stele_dir()
    print stele_dir
    log.info('Launching the browser')
    driver = chrome_launch()

    if check_true(CFG['browser']['restrict_domain']) is True:
        watch_browser(driver, .5)
コード例 #2
0
ファイル: browser.py プロジェクト: WaltersArtMuseum/stele
""" Browser control system for kiosks """

import logging
from logging.handlers import TimedRotatingFileHandler
import time
import re
from init import get_stele_dir, get_machines_config, check_true
from selenium import webdriver

#
# Logging
#

# Logger settings
LOG_FILENAME = get_stele_dir() + '/log/stele.log'
log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG)

# Rotate logs daily. Keep 30 days.
handler = TimedRotatingFileHandler(
    LOG_FILENAME,
    when="d",
    interval=1,
    backupCount=30)

formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
handler.setFormatter(formatter)
log.addHandler(handler)

#