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
=== modified file 'django_project/config/main.cfg'
--- django_project/config/main.cfg 2013-08-27 15:27:32 +0000
+++ django_project/config/main.cfg 2013-08-29 10:52:27 +0000
@@ -103,10 +103,9 @@
103filename = ./tmp/webapp.log103filename = ./tmp/webapp.log
104104
105[import_sca_apps_handler]105[import_sca_apps_handler]
106class = logging.handlers.WatchedFileHandler106class = logging.StreamHandler
107level = INFO107level = INFO
108formatter = simple_no_name108formatter = simple_no_name
109filename = ./tmp/import_sca_apps.log
110109
111[import_sca_logger]110[import_sca_logger]
112handlers = importer111handlers = importer
113112
=== modified file 'src/webcatalog/management/commands/import_sca_apps.py'
--- src/webcatalog/management/commands/import_sca_apps.py 2013-08-26 12:47:04 +0000
+++ src/webcatalog/management/commands/import_sca_apps.py 2013-08-29 10:52:27 +0000
@@ -77,7 +77,7 @@
77 if created:77 if created:
78 logger.info(78 logger.info(
79 "Created a DistroSeries record called '{0}'.\n".format(79 "Created a DistroSeries record called '{0}'.\n".format(
80 series_name), 1)80 series_name))
81 package_name = self.import_app_from_data(81 package_name = self.import_app_from_data(
82 app_data, icon_data, distroseries)82 app_data, icon_data, distroseries)
83 if package_name:83 if package_name:

Subscribers

People subscribed via source and target branches