Merge lp:~michael.nelson/ubuntu-webcatalog/switch-to-stream-log-handler into lp:ubuntu-webcatalog

Proposed by Michael Nelson
Status: Merged
Approved by: Michael Nelson
Approved revision: 187
Merged at revision: 187
Proposed branch: lp:~michael.nelson/ubuntu-webcatalog/switch-to-stream-log-handler
Merge into: lp:ubuntu-webcatalog
Diff against target: 28 lines (+2/-3)
2 files modified
django_project/config/main.cfg (+1/-2)
src/webcatalog/management/commands/import_sca_apps.py (+1/-1)
To merge this branch: bzr merge lp:~michael.nelson/ubuntu-webcatalog/switch-to-stream-log-handler
Reviewer Review Type Date Requested Status
Michael Nelson (community) Approve
Michael Foord (community) Approve
Review via email: mp+182859@code.launchpad.net

Commit message

Use a console logging handler for import-sca-apps.

Description of the change

Turns out that logging to the console is much clearer (and can be redirected as appropriate on a cron).

Also removed extra arg for logging (which was left over from when we printed using verbosity) - nice that on saucy it complains about it :-)

`fab test`

To post a comment you must log in.
Revision history for this message
Michael Foord (mfoord) wrote :

LGTM

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

Voting does not meet specified criteria. Required: Approve >= 1, Disapprove == 0, Needs Fixing == 0, Needs Information == 0, Resubmit == 0, Pending == 0. Got: 1 Pending.

Revision history for this message
Michael Nelson (michael.nelson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'django_project/config/main.cfg'
2--- django_project/config/main.cfg 2013-08-27 15:27:32 +0000
3+++ django_project/config/main.cfg 2013-08-29 10:52:27 +0000
4@@ -103,10 +103,9 @@
5 filename = ./tmp/webapp.log
6
7 [import_sca_apps_handler]
8-class = logging.handlers.WatchedFileHandler
9+class = logging.StreamHandler
10 level = INFO
11 formatter = simple_no_name
12-filename = ./tmp/import_sca_apps.log
13
14 [import_sca_logger]
15 handlers = importer
16
17=== modified file 'src/webcatalog/management/commands/import_sca_apps.py'
18--- src/webcatalog/management/commands/import_sca_apps.py 2013-08-26 12:47:04 +0000
19+++ src/webcatalog/management/commands/import_sca_apps.py 2013-08-29 10:52:27 +0000
20@@ -77,7 +77,7 @@
21 if created:
22 logger.info(
23 "Created a DistroSeries record called '{0}'.\n".format(
24- series_name), 1)
25+ series_name))
26 package_name = self.import_app_from_data(
27 app_data, icon_data, distroseries)
28 if package_name:

Subscribers

People subscribed via source and target branches