def log_err(errmsg):
 try:
  errmsg = str(errmsg)
 except Exception as e:
  errmsg = str(e)
 for line in errmsg.splitlines():
  log.msg(('[EE] %s' % line))

def log_err ( errmsg ) : try : errmsg = str ( errmsg ) except Exception as e : errmsg = str ( e ) for line in errmsg . splitlines ( ) : log . msg ( ( '[EE] %s' % line ) )
prints/logs an error message to the server log .