Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A new class is to be added for reading the date and syslog messages file path. 



———————syslog_configutils.py——————

To add the functionality on which logs to check in log_match(), syslog or local logs we will follow this table -

...

class syslog_utils(object):

    def _init_(self, sylog):        

         // This dictionary will hold the values for the sysconf files for various linux distributions

...

   

   def log_match(syslog=10)

      if syslog=1      

          x= syslog_config.log_config_values(syslog=1)

...

         PtlLogMatchError(rc=1, rv=False, msg=_msg)        



  def _log_match(syslog=10)

      if syslog=1

         Self.logutil=PBSLogUtils(syslog=1)

...

  def init_logfile_path(self, syslog=10)

     if syslog= 1

        self.logfile = syslog_configutils.path_to_syslog()

     elif locally

...

def log_lines(self, syslog=10)

  if syslog = 1

      filename = syslog_configutils.path_to_syslog()

  elif locally

...

Change regular expression ‘tm_re ’ to match the date format of the syslog file.

...



tm_re=_date_format_


Class PBSLogUtils(object)

     syslog=0

     _init_(self, syslog=0):

         if self.syslog_value = 1

               syslog syslog=01

             tm_re = syslog_config.time_syslog()

...

     def convert_date_time(fmt)

         if syslog _value = 1

             self.fmt=    //get format from syslog_config.time_syslog()

...