aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2012-12-04 19:58:09 +0000
committerBryn M. Reeves <bmr@redhat.com>2012-12-04 19:58:09 +0000
commite234fbc711b6786f712ed11bafc0b40890b28dca (patch)
tree3cef6b9c7344732dfa7dbdbf5782d60715b211bc
parentc2b85c74b262898869cecd5fc4c20b0c2c73ede6 (diff)
downloadsos-e234fbc711b6786f712ed11bafc0b40890b28dca.tar.gz
Add symbolic links for truncated log files
-rw-r--r--sos/plugins/__init__.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
index cf0aa97d..981f7a4d 100644
--- a/sos/plugins/__init__.py
+++ b/sos/plugins/__init__.py
@@ -399,9 +399,12 @@ class Plugin(object):
if sub:
old, new = sub
flog_name = flog.replace(old, new)
-
- self.addStringAsFile(tail(flog, sizelimit),
- flog_name.replace(os.path.sep, ".") + ".tailed")
+ strfile = flog_name.replace(os.path.sep, ".") + ".tailed"
+ self.addStringAsFile(tail(flog, sizelimit), strfile)
+ self.archive.add_link(os.path.join(
+ os.path.relpath('/', os.path.dirname(flog)), 'sos_strings',
+ self.name(), strfile), flog)
+
def addCopySpecs(self, copyspecs, sub=None):
for copyspec in copyspecs: