Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[logging] Fix logs duplication in jmxfetch.log #1852

Merged
merged 1 commit into from
Aug 21, 2015

Conversation

olivielpeau
Copy link
Member

Replaces #1850 , which was very "hacky".

The collector logs were being duplicated to jmxfetch.log because agent.py imports jmxfetch.py, which causes the initialize_logging method to be called twice.

This fixes the issue by only initializing logging in jmxfetch.py when it's the main module (and not imported from another module).

The collector logs were being duplicated to `jmxfetch.log` because
`agent.py` imports `jmxfetch.py`, which causes the `initialize_logging`
method to be called twice.

This fixes the issue by only initializing logging in `jmxfetch.py` when
it's directly called (and not imported from another module).
@yannmh
Copy link
Member

yannmh commented Aug 21, 2015

Looks good to me !

yannmh added a commit that referenced this pull request Aug 21, 2015
[logging] Fix logs duplication in jmxfetch.log
@yannmh yannmh merged commit 088cd36 into master Aug 21, 2015
@yannmh yannmh deleted the olivielpeau/fix-jmxfetchpy-logging branch August 21, 2015 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants