@add_handler('plainlog')
def qute_plainlog(url):
 if (log.ram_handler is None):
  text = 'Log output was disabled.'
 else:
  try:
   level = urllib.parse.parse_qs(url.query())['level'][0]
  except KeyError:
   level = 'vdebug'
  text = log.ram_handler.dump_log(html=False, level=level)
 html = jinja.render('pre.html', title='log', content=text)
 return ('text/html', html)

@ add_handler ( 'plainlog' ) def qute_plainlog ( url ) : if ( log . ram_handler is None ) : text = 'Log output was disabled.' else : try : level = urllib . parse . parse_qs ( url . query ( ) ) [ 'level' ] [ 0 ] except KeyError : level = 'vdebug' text = log . ram_handler . dump_log ( html = False , level = level ) html = jinja . render ( 'pre.html' , title = 'log' , content = text ) return ( 'text/html' , html )
handler for qute:plainlog .