Skip to content

Improve logging output, add debug#3

Merged
cjonesy merged 1 commit intomasterfrom
logging_improvements
Jul 7, 2020
Merged

Improve logging output, add debug#3
cjonesy merged 1 commit intomasterfrom
logging_improvements

Conversation

@cjonesy
Copy link
Contributor

@cjonesy cjonesy commented Jul 7, 2020

Logs will now indicate which monitor is sleeping:

2020/05/28 09:26:32 INFO: [my-first-monitor] Sleeping for 300 seconds
2020/05/28 09:26:32 INFO: [my-second-monitor] Sleeping for 300 seconds
2020/05/28 09:26:32 INFO: [my-other-monitor] Sleeping for 300 seconds

When debug is enabled (anemometer start --debug), you'll see the actual metrics in the logs:

2020/05/28 09:26:32 DEBUG: [my-first-monitor] Publishing metric - Name: my.first.metric, Value: 1, Tags: [my:tag, other:tag]
2020/05/28 09:26:32 INFO: [my-first-monitor] Sleeping for 300 seconds
2020/05/28 09:26:32 DEBUG: [my-second-monitor] Publishing metric - Name: my.second.metric, Value: 1.9999, Tags: [my:tag, other:tag]
2020/05/28 09:26:32 INFO: [my-second-monitor] Sleeping for 300 seconds

Closes #2

@cjonesy cjonesy requested a review from joshuawscott July 7, 2020 11:58
Copy link
Member

@joshuawscott joshuawscott left a comment

Choose a reason for hiding this comment

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

:shipit:

@cjonesy cjonesy merged commit 7e0ef9d into master Jul 7, 2020
@cjonesy cjonesy deleted the logging_improvements branch July 7, 2020 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Logging improvements

2 participants

Comments