Optimize logging

This commit is contained in:
croneter 2019-04-13 14:22:38 +02:00
parent 9a9bc9f0eb
commit 0acf470343

View file

@ -159,7 +159,7 @@ class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
'''Send headers and reponse '''Send headers and reponse
''' '''
xbmc.log('Plex.WebService handle_request called. headers %s, path: %s' xbmc.log('Plex.WebService handle_request called. headers %s, path: %s'
% (headers_only, self.path), xbmc.LOGWARNING) % (headers_only, self.path), xbmc.LOGDEBUG)
try: try:
if b'extrafanart' in self.path or b'extrathumbs' in self.path: if b'extrafanart' in self.path or b'extrathumbs' in self.path:
raise Exception('unsupported artwork request') raise Exception('unsupported artwork request')
@ -181,7 +181,7 @@ class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
def strm(self): def strm(self):
''' Return a dummy video and and queue real items. ''' Return a dummy video and and queue real items.
''' '''
xbmc.log('PLEX.webserver: starting strm', xbmc.LOGWARNING) xbmc.log('PLEX.webservice: starting strm', xbmc.LOGDEBUG)
self.send_response(200) self.send_response(200)
self.send_header(b'Content-type', b'text/html') self.send_header(b'Content-type', b'text/html')
self.end_headers() self.end_headers()
@ -209,12 +209,11 @@ class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
return return
path = 'plugin://plugin.video.plexkodiconnect?mode=playstrm&plex_id=%s' % params['plex_id'] path = 'plugin://plugin.video.plexkodiconnect?mode=playstrm&plex_id=%s' % params['plex_id']
xbmc.log('PLEX.webserver: sending %s' % path, xbmc.LOGWARNING) xbmc.log('PLEX.webservice: sending %s' % path, xbmc.LOGDEBUG)
self.wfile.write(bytes(path.encode('utf-8'))) self.wfile.write(bytes(path.encode('utf-8')))
if params['plex_id'] not in self.server.pending: if params['plex_id'] not in self.server.pending:
xbmc.log('PLEX.webserver: %s: path: %s params: %s' xbmc.log('PLEX.webservice: path %s params %s' % (self.path, params),
% (str(id(self)), str(self.path), str(params)), xbmc.LOGDEBUG)
xbmc.LOGWARNING)
self.server.pending.append(params['plex_id']) self.server.pending.append(params['plex_id'])
self.server.queue.put(params) self.server.queue.put(params)