Replace std_err_override with logging.captureWarnings(True) in pypo
The quite ugly hack with std_err_override seems to have been made for python < 2.7. Since all major distros have al least python 2.7 installed we can stop using the std_err_override hack. This removes it from pypo, media-monitor still uses the module and we can completely delete it when we have remove media-monitor after having maybe backported the watched folders feature to analyzer.
This commit is contained in:
parent
a583d8fa1e
commit
dfe3f077fd
6 changed files with 6 additions and 17 deletions
|
@ -28,7 +28,6 @@ from configobj import ConfigObj
|
|||
# custom imports
|
||||
#from util import *
|
||||
from api_clients import *
|
||||
from std_err_override import LogWriter
|
||||
|
||||
LOG_LEVEL = logging.INFO
|
||||
LOG_PATH = '/var/log/airtime/pypo/notify.log'
|
||||
|
@ -54,6 +53,7 @@ parser.add_option("-n", "--liquidsoap-started", help="notify liquidsoap started"
|
|||
(options, args) = parser.parse_args()
|
||||
|
||||
# Set up logging
|
||||
logging.captureWarnings(True)
|
||||
logFormatter = logging.Formatter("%(asctime)s [%(module)s] [%(levelname)-5.5s] %(message)s")
|
||||
rootLogger = logging.getLogger()
|
||||
rootLogger.setLevel(LOG_LEVEL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue