Allow global config setting for PMS log window size.

This commit is contained in:
Tim Van 2016-05-30 15:59:01 +02:00
parent 8f0ba5ba4f
commit 38e04bd42a
No known key found for this signature in database
GPG key ID: 3F8B74168459A257
2 changed files with 3 additions and 1 deletions

View file

@ -46,6 +46,7 @@ _CONFIG_DEFINITIONS = {
'PMS_IP': (str, 'PMS', '127.0.0.1'), 'PMS_IP': (str, 'PMS', '127.0.0.1'),
'PMS_IS_REMOTE': (int, 'PMS', 0), 'PMS_IS_REMOTE': (int, 'PMS', 0),
'PMS_LOGS_FOLDER': (str, 'PMS', ''), 'PMS_LOGS_FOLDER': (str, 'PMS', ''),
'PMS_LOGS_LINE_CAP': (int, 'PMS', 1000),
'PMS_NAME': (unicode, 'PMS', ''), 'PMS_NAME': (unicode, 'PMS', ''),
'PMS_PORT': (int, 'PMS', 32400), 'PMS_PORT': (int, 'PMS', 32400),
'PMS_TOKEN': (str, 'PMS', ''), 'PMS_TOKEN': (str, 'PMS', ''),

View file

@ -2287,7 +2287,7 @@ class WebInterface(object):
@cherrypy.tools.json_out() @cherrypy.tools.json_out()
@requireAuth(member_of("admin")) @requireAuth(member_of("admin"))
@addtoapi() @addtoapi()
def get_plex_log(self, window=1000, **kwargs): def get_plex_log(self, **kwargs):
""" Get the PMS logs. """ Get the PMS logs.
``` ```
@ -2309,6 +2309,7 @@ class WebInterface(object):
] ]
``` ```
""" """
window = int(kwargs.get('window', plexpy.CONFIG.PMS_LOGS_LINE_CAP))
log_lines = [] log_lines = []
log_type = kwargs.get('log_type', 'server') log_type = kwargs.get('log_type', 'server')