...
By default this attribute should be set to false
2) Adding extra attribute 'syslog' to log_match(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)
By default this attribute should be set to false
log_match() calls the _log_match() method.
...
class PBSService(PBSObject)
def log_match(syslog=TrueFalse)
if syslog:
x= syslog_config.log_config_values(syslog=1)
...
return _log_match(syslog=0)
elif x==3
syslog_return = _log_match(syslog=1)
// Read in local logs only if syslog log match is returned true
if syslog_return:
return _log_match(syslog=0)
else:
return syslog_return
else:
_msg= "Log file to check not set"
PtlLogMatchError(rc=1, rv=False, msg=_msg)
def _log_match(syslog=TrueFalse)
if syslog=1
Self.logutil=PBSLogUtils(syslog=1)
...
def init_logfile_path(syslog=TrueFalse)
if syslog= 1
self.logfile = syslog_utils.path_to_syslog()
...
Note- 'def log_lines' returns the last n lines of the log file.
def log_lines(self, syslog=TrueFalse)
if syslog = 1
filename = syslog_utils.path_to_syslog()
...