def debug_mode():
 if (platform.system() == 'Windows'):
  temp_dir = os.environ['Temp'].replace('\\', '/')
 else:
  temp_dir = '/tmp/'
 log_handler = logging.FileHandler('{0:s}/onionshare_server.log'.format(temp_dir))
 log_handler.setLevel(logging.WARNING)
 app.logger.addHandler(log_handler)

def debug_mode ( ) : if ( platform . system ( ) == 'Windows' ) : temp_dir = os . environ [ 'Temp' ] . replace ( '\\' , '/' ) else : temp_dir = '/tmp/' log_handler = logging . FileHandler ( '{0:s}/onionshare_server.log' . format ( temp_dir ) ) log_handler . setLevel ( logging . WARNING ) app . logger . addHandler ( log_handler )
turn on debugging mode .