Merge lp:~tgm4883/mythbuntu/mythbuntu-log-grabber into lp:~mythbuntu-dev/mythbuntu/mythbuntu-log-grabber

Proposed by Thomas Mashos
Status: Merged
Merged at revision: 68
Proposed branch: lp:~tgm4883/mythbuntu/mythbuntu-log-grabber
Merge into: lp:~mythbuntu-dev/mythbuntu/mythbuntu-log-grabber
Diff against target: 81 lines (+38/-13)
2 files modified
debian/changelog (+6/-0)
plugins/python/log_grabber.py (+32/-13)
To merge this branch: bzr merge lp:~tgm4883/mythbuntu/mythbuntu-log-grabber
Reviewer Review Type Date Requested Status
Dave Walker (community) Approve
Review via email: mp+101558@code.launchpad.net

Description of the change

Added missing logs new in 0.25

To post a comment you must log in.
Revision history for this message
Dave Walker (davewalker) wrote :

Thanks for addressing this. I think the loop could be better TBH, but it's certainly better than the current state. Merging and uploading.. Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-08-31 17:58:13 +0000
3+++ debian/changelog 2012-04-11 14:00:32 +0000
4@@ -1,3 +1,9 @@
5+mythbuntu-log-grabber (0.10-0ubuntu1) UNRELEASED; urgency=low
6+
7+ * Added new logs for 0.25
8+
9+ -- Thomas Mashos <thomas@mashos.com> Wed, 11 Apr 2012 06:56:23 -0700
10+
11 mythbuntu-log-grabber (0.9-0ubuntu2) oneiric; urgency=low
12
13 [ Marcin Juszkiewicz ]
14
15=== modified file 'plugins/python/log_grabber.py'
16--- plugins/python/log_grabber.py 2011-04-13 18:56:02 +0000
17+++ plugins/python/log_grabber.py 2012-04-11 14:00:32 +0000
18@@ -240,18 +240,21 @@
19 MAXLINES=1000
20 MLP=MAXLINES/100
21 LINES=MAXLINES+MLP
22- f = open(FILEPATH, "r")
23 linestuffs = []
24- more = True
25- while more:
26- line = f.readline()
27- if line:
28- if len(linestuffs) >= LINES:
29- del linestuffs[0:MLP]
30- linestuffs.append(line)
31- else:
32- more = False
33- f.close()
34+ if os.path.isfile(FILEPATH):
35+ f = open(FILEPATH, "r")
36+ more = True
37+ while more:
38+ line = f.readline()
39+ if line:
40+ if len(linestuffs) >= LINES:
41+ del linestuffs[0:MLP]
42+ linestuffs.append(line)
43+ else:
44+ more = False
45+ f.close()
46+ else:
47+ linestuffs.append("** "+FILEPATH+" not found **\n")
48 data_in = "=== "+FILEPATH+" ===\n"
49 for stuff in linestuffs:
50 data_in += stuff ## Change to write to logfile
51@@ -280,12 +283,28 @@
52 self.tail_log('/var/log/syslog', "Syslog")
53
54 def mythfrontend(self):
55- """Read in the Frontend Log"""
56+ """Read in the Frontend type logs"""
57 self.tail_log('/var/log/mythtv/mythfrontend.log', "Mythfrontend Log")
58+ self.tail_log('/var/log/mythtv/mythavtest.log', "Mythavtest Log")
59+ self.tail_log('/var/log/mythtv/mythlcdserver.log', "Mythlcdserver Log")
60+ self.tail_log('/var/log/mythtv/mythmessage.log', "Mythmessage Log")
61+ self.tail_log('/var/log/mythtv/mythshutdown.log', "Mythshutdown Log")
62+ self.tail_log('/var/log/mythtv/mythwelcome.log', "Mythwelcome Log")
63
64 def mythbackend(self):
65- """Read in the Backend Log"""
66+ """Read in the Backend type logs"""
67 self.tail_log('/var/log/mythtv/mythbackend.log', "Mythbackend Log")
68+ self.tail_log('/var/log/mythtv/mythccextractor.log', "Mythccextractor Log")
69+ self.tail_log('/var/log/mythtv/mythcommflag.log', "Mythcommflag Log")
70+ self.tail_log('/var/log/mythtv/mythexport.log', "Mythexport Log")
71+ self.tail_log('/var/log/mythtv/mythfilldatabase.log', "Mythfilldatabase Log")
72+ self.tail_log('/var/log/mythtv/mythjobqueue.log', "Mythjobqueue Log")
73+ self.tail_log('/var/log/mythtv/mythmediaserver.log', "Mythmediaserver Log")
74+ self.tail_log('/var/log/mythtv/mythmetadatalookup.log', "Mythmetadatalookup Log")
75+ self.tail_log('/var/log/mythtv/mythpreviewgen.log', "Mythpreviewgen Log")
76+ self.tail_log('/var/log/mythtv/mythtranscode.log', "Mythtranscode Log")
77+ self.tail_log('/var/log/mythtv/mythtv-setup.log', "Mythtv-setup Log")
78+ self.tail_log('/var/log/mythtv/mythutil.log', "mythutil Log")
79
80 def disk_space(self):
81 """Gather all Disk Information"""

Subscribers

People subscribed via source and target branches

to all changes: