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

Use rfc3339 timestamps in telegraf log output #1879

Merged
merged 1 commit into from
Nov 3, 2016
Merged

Use rfc3339 timestamps in telegraf log output #1879

merged 1 commit into from
Nov 3, 2016

Conversation

sparrc
Copy link
Contributor

@sparrc sparrc commented Oct 11, 2016

Required for all PRs:

  • CHANGELOG.md updated (we recommend not updating this until the PR has been approved by a maintainer)
  • Sign CLA (if not already signed)
  • README.md updated (if adding a new plugin)

closes #1564

@@ -30,6 +31,7 @@ func (t *telegrafLog) Write(p []byte) (n int, err error) {
// interpreted as stdout. If there is an error opening the file the
// logger will fallback to stdout.
func SetupLogging(debug, quiet bool, logfile string) {
log.SetFlags(0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this only unset the date flag, instead of clearing all flags?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the flags all deal with prefixes to the logging output, either controlling timestamp formatting or for printing the line-number that the log came from. I don't plan on supporting any of those at the moment, but we could fairly easily add support in the future.

@sparrc sparrc force-pushed the cs1564 branch 2 times, most recently from 199fd45 to 317a464 Compare October 12, 2016 16:08
@sparrc sparrc added this to the 1.2.0 milestone Oct 27, 2016
closes #1564

also add unit and benchmark tests
@sparrc sparrc merged commit 47de43a into master Nov 3, 2016
@sparrc sparrc deleted the cs1564 branch November 3, 2016 18:48
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.

Use rfc3339 timestamps w/ timezone in log output
2 participants