aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Quigley <bryan.quigley@canonical.com>2015-02-25 15:11:00 -0500
committerAdam Stokes <adam.stokes@ubuntu.com>2015-03-02 13:23:02 -0500
commit1dea7d3086b8d9200aa48d051420bcf8c51dbe98 (patch)
tree3eff57c96ab4a3b884597799bf9a90098b70845a
parent6dd9a60a8514c323152df2c1b42765c452e66396 (diff)
downloadsos-1dea7d3086b8d9200aa48d051420bcf8c51dbe98.tar.gz
[apport] Move apport logging to apport plugin
Apport logging was in the logs plugin previously. Also added "all logs" support so it could collect more than it previously did. Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
-rw-r--r--sos/plugins/apport.py8
-rw-r--r--sos/plugins/logs.py3
2 files changed, 9 insertions, 2 deletions
diff --git a/sos/plugins/apport.py b/sos/plugins/apport.py
index c942c2de..47f6595c 100644
--- a/sos/plugins/apport.py
+++ b/sos/plugins/apport.py
@@ -24,6 +24,14 @@ class Apport(Plugin, DebianPlugin, UbuntuPlugin):
profiles = ('debug',)
def setup(self):
+ if not self.get_option("all_logs"):
+ limit = self.get_option("log_size")
+ self.add_copy_spec_limit("/var/log/apport.log",
+ sizelimit=limit)
+ self.add_copy_spec_limit("/var/log/apport.log.1",
+ sizelimit=limit)
+ else:
+ self.add_copy_spec("/var/log/apport*")
self.add_copy_spec("/etc/apport/*")
self.add_copy_spec("/var/lib/whoopsie/whoopsie-id")
self.add_cmd_output(
diff --git a/sos/plugins/logs.py b/sos/plugins/logs.py
index a4fc84d2..fc3096ea 100644
--- a/sos/plugins/logs.py
+++ b/sos/plugins/logs.py
@@ -86,8 +86,7 @@ class DebianLogs(Logs, DebianPlugin, UbuntuPlugin):
"/var/log/mail*",
"/var/log/dist-upgrade",
"/var/log/installer",
- "/var/log/unattended-upgrades",
- "/var/log/apport.log"
+ "/var/log/unattended-upgrades"
])