Пример #1
0
 def log_fatal(self, string, *args):
     self._logger_stream_err.write(
         time.strftime('%Y-%m-%d\t%H:%M:%S', time.localtime(time.time())))
     self._logger_stream_err.write("\tFatal\t")
     if (self._add_simulation_time_in_log):
         self._logger_stream_err.write(
             "world_time:%s\t" % simulation_time_to_str(self.world_time))
     raise RuntimeError(args_to_string(string, args))
Пример #2
0
 def log_warning(self, string, *args):
     self._logger_stream_err.write(
         time.strftime('%Y-%m-%d\t%H:%M:%S', time.localtime(time.time())))
     self._logger_stream_err.write("\tWarning\t")
     if (self._add_simulation_time_in_log):
         self._logger_stream_err.write(
             "world_time:%s\t" % simulation_time_to_str(self.world_time))
     self._logger_stream_err.write(args_to_string(string, args))
     self._logger_stream_err.write("\n")
Пример #3
0
 def log_notice(self, string, *args):
     if (self._logger_level < 3):
         self._logger_stream_std.write(
             time.strftime('%Y-%m-%d\t%H:%M:%S',
                           time.localtime(time.time())))
         self._logger_stream_std.write("\tNotice\t")
         if (self._add_simulation_time_in_log):
             self._logger_stream_std.write(
                 "world_time:%s\t" %
                 simulation_time_to_str(self.world_time))
         self._logger_stream_std.write(args_to_string(string, args))
         self._logger_stream_std.write("\n")