diff --git a/airtime_mvc/application/configs/navigation.php b/airtime_mvc/application/configs/navigation.php index 47b32b714..9ed778122 100644 --- a/airtime_mvc/application/configs/navigation.php +++ b/airtime_mvc/application/configs/navigation.php @@ -66,12 +66,6 @@ $pages = array( 'controller' => 'Preference', 'action' => 'stream-setting' ), - array( - 'label' => _('Support Feedback'), - 'module' => 'default', - 'controller' => 'Preference', - 'action' => 'support-setting' - ), array( 'label' => _('Status'), 'module' => 'default', diff --git a/install b/install index 714b01c0a..e5c329903 100755 --- a/install +++ b/install @@ -22,9 +22,9 @@ showhelp () { No output except errors -f, --force Turn off interactive prompts - --distribution + --distribution=DISTRIBUTION Linux distribution the installation is being run on - --release + --release=RELEASE Distribution release -d, --ignore-dependencies Don't install binary dependencies diff --git a/python_apps/pypo/bin/pyponotify b/python_apps/pypo/bin/pyponotify index bea57298d..bf316480a 100755 --- a/python_apps/pypo/bin/pyponotify +++ b/python_apps/pypo/bin/pyponotify @@ -30,6 +30,9 @@ from configobj import ConfigObj from api_clients import * from std_err_override import LogWriter +LOG_LEVEL = logging.INFO +LOG_PATH = '/var/log/airtime/pypo/notify.log' + # help screeen / info usage = "%prog [options]" + " - notification gateway" parser = OptionParser(usage=usage) @@ -50,10 +53,20 @@ parser.add_option("-n", "--liquidsoap-started", help="notify liquidsoap started" # parse options (options, args) = parser.parse_args() -# configure logging -logging.config.fileConfig('/etc/airtime/notify_logging.cfg') -logger = logging.getLogger('notify') -LogWriter.override_std_err(logger) +# Set up logging +logFormatter = logging.Formatter("%(asctime)s [%(module)s] [%(levelname)-5.5s] %(message)s") +rootLogger = logging.getLogger() +rootLogger.setLevel(LOG_LEVEL) + +fileHandler = logging.handlers.RotatingFileHandler(filename=LOG_PATH, maxBytes=1024*1024*30, + backupCount=8) +fileHandler.setFormatter(logFormatter) +rootLogger.addHandler(fileHandler) + +consoleHandler = logging.StreamHandler() +consoleHandler.setFormatter(logFormatter) +rootLogger.addHandler(consoleHandler) +logger = rootLogger #need to wait for Python 2.7 for this.. #logging.captureWarnings(True) diff --git a/python_apps/pypo/install/notify_logging.cfg b/python_apps/pypo/install/notify_logging.cfg deleted file mode 100644 index 30eddc2f4..000000000 --- a/python_apps/pypo/install/notify_logging.cfg +++ /dev/null @@ -1,28 +0,0 @@ -[loggers] -keys=root,notify - -[handlers] -keys=notify - -[formatters] -keys=simpleFormatter - -[logger_root] -level=DEBUG -handlers=notify - -[logger_notify] -level=DEBUG -handlers=notify -qualname=notify -propagate=0 - -[handler_notify] -class=logging.handlers.RotatingFileHandler -level=DEBUG -formatter=simpleFormatter -args=("/var/log/airtime/pypo/notify.log", 'a', 1000000, 5,) - -[formatter_simpleFormatter] -format=%(asctime)s %(levelname)s - [%(filename)s : %(funcName)s() : line %(lineno)d] - %(message)s -datefmt= diff --git a/python_apps/pypo/install/pypo_logging.cfg b/python_apps/pypo/install/pypo_logging.cfg deleted file mode 100644 index 4c1ddd172..000000000 --- a/python_apps/pypo/install/pypo_logging.cfg +++ /dev/null @@ -1,58 +0,0 @@ -[loggers] -keys=root,fetch,push,recorder,message_h - -[handlers] -keys=pypo,recorder,message_h - -[formatters] -keys=simpleFormatter - -[logger_root] -level=DEBUG -handlers=pypo - -[logger_fetch] -level=DEBUG -handlers=pypo -qualname=fetch -propagate=0 - -[logger_push] -level=DEBUG -handlers=pypo -qualname=push -propagate=0 - -[logger_recorder] -level=DEBUG -handlers=recorder -qualname=recorder -propagate=0 - -[logger_message_h] -level=DEBUG -handlers=message_h -qualname=message_h -propagate=0 - -[handler_pypo] -class=logging.handlers.RotatingFileHandler -level=DEBUG -formatter=simpleFormatter -args=("/var/log/airtime/pypo/pypo.log", 'a', 5000000, 10,) - -[handler_recorder] -class=logging.handlers.RotatingFileHandler -level=DEBUG -formatter=simpleFormatter -args=("/var/log/airtime/pypo/show-recorder.log", 'a', 1000000, 5,) - -[handler_message_h] -class=logging.handlers.RotatingFileHandler -level=DEBUG -formatter=simpleFormatter -args=("/var/log/airtime/pypo/message-handler.log", 'a', 1000000, 5,) - -[formatter_simpleFormatter] -format=%(asctime)s %(levelname)s - [%(filename)s : %(funcName)s() : line %(lineno)d] - %(message)s -datefmt= diff --git a/python_apps/pypo/liquidsoap/generate_liquidsoap_cfg.py b/python_apps/pypo/liquidsoap/generate_liquidsoap_cfg.py index fd78d6ddb..299d43262 100644 --- a/python_apps/pypo/liquidsoap/generate_liquidsoap_cfg.py +++ b/python_apps/pypo/liquidsoap/generate_liquidsoap_cfg.py @@ -1,4 +1,5 @@ import logging +import os import sys import time import traceback @@ -28,7 +29,9 @@ def generate_liquidsoap_config(ss): # ignore squashes unused variable errors from Liquidsoap fh.write(("ignore(%s)\n" % key).encode('utf-8')) + auth_path = os.path.dirname(os.path.realpath(__file__)) fh.write('log_file = "/var/log/airtime/pypo-liquidsoap/