...
This syslog attribute will also be passed on to further functions from log_match- def _log_match(syslog=false), init_logfile_path(syslog=False), def log_lines(self, syslog=False)
log_match() calls the _log_match() method.
...
x= syslog_config.log_config_values(syslog=1true)
if x==1
return _log_match(syslog=1true)
elif x==2
return _log_match(syslog=0false)
elif x==3
syslog_return = _log_match(syslog=1true)
// Read in local logs only if syslog log match is returned true
...
return _log_match(syslog=0false)
else:
return syslog_return
...
def _log_match(syslog=False)
if syslog=1 Self.logutil=PBSLogUtils(syslog=1):
self.init_logfile_path(syslog=true)
...
def init_logfile_path(syslog=False)
if syslog= 1:
self self.logfile syslogUtils = syslog_utils.path_to_syslog()
elif locally self.logfile = syslog__local_utils.path_to_syslog()
Note- 'def log_lines' returns the last n lines of the log file.
def log_lines(syslog=False)
if syslog = 1:
self.syslogUtils = syslog_utils()
filename = syslog_utils.path_to_syslog() elif locally
filename = __local_path__
——————————In pbs_logutils.py—————————————
Currently we are only supporting for the current syslog file and not for previous days file. That would be covered in PP-969 Change regular expression ‘tm_re ’ to match the date format of the syslog file.
tm_re=_date_format_
Class PBSLogUtils(object) syslog=false
def convert_date_time(syslog=false)
...