'Get the PMS logs.
Required parameters:
None
Optional parameters:
window (int):           The number of tail lines to return
log_type (str):         "server" or "scanner"
Returns:
json:
[["May 08, 2016 09:35:37",
"DEBUG",
"Auth: Came in with a super-token, authorization succeeded."'

@cherrypy.expose
@cherrypy.tools.json_out()
@requireAuth(member_of('admin'))
@addtoapi()
def get_plex_log(self, **kwargs):

    window = int(kwargs.get('window', plexpy.CONFIG.PMS_LOGS_LINE_CAP))
    log_lines = []
    log_type = kwargs.get('log_type', 'server')
    try:
        log_lines = {'data': log_reader.get_log_tail(window=window, parsed=True, log_type=log_type)}
    except:
        logger.warn(u'Unable    to    retrieve    Plex    Logs.')
    return log_lines
