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

Change log_hashes to log hash-like objects properly #268

Merged
merged 1 commit into from
Sep 6, 2017

Conversation

Fryguy
Copy link
Member

@Fryguy Fryguy commented Sep 6, 2017

This will also log Config::Options properly, but I didn't want to include the config gem because it messes with global state. HWIA showed the same problems, and active support is already a dependency, so it will suffice.

@Fryguy Fryguy added the bug label Sep 6, 2017
@Fryguy
Copy link
Member Author

Fryguy commented Sep 6, 2017

@agrare Please review.

cc @bdunne

@Fryguy
Copy link
Member Author

Fryguy commented Sep 6, 2017

Note that before it would log with lots of internal structure, and now it logs more like a hash which is cleaner to read.

@miq-bot
Copy link
Member

miq-bot commented Sep 6, 2017

Checked commit Fryguy@0316bcc with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks fine. 🍰

Copy link
Member

@agrare agrare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@agrare agrare merged commit 2270f3d into ManageIQ:master Sep 6, 2017
@agrare agrare self-assigned this Sep 6, 2017
@agrare agrare added this to the Sprint 69 Ending Sep 18, 2017 milestone Sep 6, 2017
agrare added a commit to agrare/manageiq that referenced this pull request Sep 7, 2017
The event catcher runner was printing the blacklisted events array using
the VMDBLogger#log_hashes method.  Now that this method calls .to_hash
on the argument
(ManageIQ/manageiq-gems-pending#268)
this is throwing an exception for non-hash type arguments.

Instead of using log_hashes just log the elements of the array joined by
newlines directly.
@Fryguy Fryguy deleted the log_hashes_config_options branch September 7, 2017 14:50
@Fryguy Fryguy added the fine/yes label Jan 3, 2018
@Fryguy
Copy link
Member Author

Fryguy commented Jan 3, 2018

simaishi pushed a commit that referenced this pull request Jan 4, 2018
Change log_hashes to log hash-like objects properly
(cherry picked from commit 2270f3d)

https://bugzilla.redhat.com/show_bug.cgi?id=1531146
@simaishi
Copy link
Contributor

simaishi commented Jan 4, 2018

Fine backport details:

$ git log -1
commit ae3c7fa1865a274dcf52f135d8ee8f7eadf496b8
Author: Adam Grare <[email protected]>
Date:   Wed Sep 6 19:42:01 2017 -0400

    Merge pull request #268 from Fryguy/log_hashes_config_options
    
    Change log_hashes to log hash-like objects properly
    (cherry picked from commit 2270f3d1de28e93980e7da5c6a71a82f6c7d03b7)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1531146

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.

4 participants