a flag added to grep which is equivalent to --binary-files=text in support bundle syslog
@@ -132,7 +132,7 @@ class SupportBuilder:
# The fledge entries from the syslog file
temp_file = self._interim_file_path + "/" + "syslog-{}".format(file_spec)
try:
- subprocess.call("grep '{}' {} > {}".format("Fledge", _SYSLOG_FILE, temp_file), shell=True)
+ subprocess.call("grep -a '{}' {} > {}".format("Fledge", _SYSLOG_FILE, temp_file), shell=True)
except OSError as ex:
raise RuntimeError("Error in creating {}. Error-{}".format(temp_file, str(ex)))
pyz.add(temp_file, arcname=basename(temp_file))
@@ -141,7 +141,7 @@ class SupportBuilder:
# The contents of the syslog file that relate to the database layer (postgres)
temp_file = self._interim_file_path + "/" + "syslogStorage-{}".format(file_spec)
try:
- subprocess.call("grep '{}' {} > {}".format("Fledge Storage", _SYSLOG_FILE, temp_file), shell=True)
+ subprocess.call("grep -a '{}' {} > {}".format("Fledge Storage", _SYSLOG_FILE, temp_file), shell=True)
except OSError as ex:
raise RuntimeError("Error in creating {}. Error-{}".format(temp_file, str(ex)))
pyz.add(temp_file, arcname=basename(temp_file))
