Merge lp:~thomir-deactivatedaccount/uservice-utils/trunk-fix-bugfix into lp:uservice-utils

Proposed by Thomi Richards
Status: Merged
Approved by: Thomi Richards
Approved revision: 7
Merged at revision: 7
Proposed branch: lp:~thomir-deactivatedaccount/uservice-utils/trunk-fix-bugfix
Merge into: lp:uservice-utils
Diff against target: 33 lines (+7/-4)
2 files modified
CHANGELOG (+3/-0)
uservice_utils/logging.py (+4/-4)
To merge this branch: bzr merge lp:~thomir-deactivatedaccount/uservice-utils/trunk-fix-bugfix
Reviewer Review Type Date Requested Status
Celso Providelo (community) Approve
Review via email: mp+255034@code.launchpad.net

Commit message

Fix a bug in the logstash config reading code.

Description of the change

Fix a bug in the logstash config reading code.

To post a comment you must log in.
Revision history for this message
Celso Providelo (cprov) wrote :

Right, callsites provide the config section as argument (config['logstash']), not the full configparser nested dictionary.

Thanks for fixing this.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CHANGELOG'
2--- CHANGELOG 2015-04-02 02:43:04 +0000
3+++ CHANGELOG 2015-04-02 03:43:12 +0000
4@@ -7,6 +7,9 @@
5 * Added `uservice_utils.logging.ExtraLogging` class to help manage passing
6 'extra' arguments to multiple logging calls.
7
8+* Fixed a bug where the logstash config was not read correctly from the passed
9+ in dictionary.
10+
11 1.0.0
12 =====
13
14
15=== modified file 'uservice_utils/logging.py'
16--- uservice_utils/logging.py 2015-04-02 03:02:58 +0000
17+++ uservice_utils/logging.py 2015-04-02 03:43:12 +0000
18@@ -71,12 +71,12 @@
19 )
20 root_logger.addHandler(handler)
21
22- if logstash_config and 'logstash' in logstash_config:
23+ if logstash_config:
24 root_logger.addHandler(
25 logstash.LogstashHandler(
26- config['logstash']['host'],
27- int(config['logstash']['port']),
28- int(config['logstash']['version'])
29+ logstash_config['host'],
30+ int(logstash_config['port']),
31+ int(logstash_config['version'])
32 )
33 )
34

Subscribers

People subscribed via source and target branches

to all changes: