예제 #1
0
 def header(self):
     items = [['message', Config.get_tmp('log_message')],
              ['error', Config.get_tmp('log_error')],
              ['disconnect', Config.get_tmp('log_socket_error')]]
     msg = [item[0] for item in items if item[1]]
     if len(msg) == 0:
         msg = ['off']
     return "\t____%s____\n%s\nLogging: %s" % (self.__title, self.__url, ', '.join(msg))
예제 #2
0
파일: Log.py 프로젝트: seanmead/PyJax1.5
 def proceed_socket_error():
     now = time.time()
     if (now - Log.last_socket_error) > Log.INTERVAL:
         Log.last_socket_error = now
         Log.do_proceed_socket_error = Config.get_tmp('log_socket_error')
     return Log.do_proceed_socket_error
예제 #3
0
파일: Log.py 프로젝트: seanmead/PyJax1.5
 def proceed_message():
     now = time.time()
     if (now - Log.last_message) > Log.INTERVAL:
         Log.last_message = now
         Log.do_proceed_message = Config.get_tmp('log_message')
     return Log.do_proceed_message
예제 #4
0
 def proceed_socket_error():
     now = time.time()
     if (now - Log.last_socket_error) > Log.INTERVAL:
         Log.last_socket_error = now
         Log.do_proceed_socket_error = Config.get_tmp('log_socket_error')
     return Log.do_proceed_socket_error
예제 #5
0
 def proceed_message():
     now = time.time()
     if (now - Log.last_message) > Log.INTERVAL:
         Log.last_message = now
         Log.do_proceed_message = Config.get_tmp('log_message')
     return Log.do_proceed_message
예제 #6
0
 def toggle_error(arg=None):
     if Config.get_tmp('log_error'):
         Config.load_tmp(log_error=False)
     else:
         Config.load_tmp(log_error=True)
     Log.last_error = 0
예제 #7
0
 def toggle_message(arg=None):
     if Config.get_tmp('log_message'):
         Config.load_tmp(log_message=False)
     else:
         Config.load_tmp(log_message=True)
     Log.last_message = 0
예제 #8
0
 def toggle_disconnect(arg=None):
     if Config.get_tmp('log_socket_error'):
         Config.load_tmp(log_socket_error=False)
     else:
         Config.load_tmp(log_socket_error=True)
     Log.last_socket_error = 0