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

Added option to write HTTP request logs to separate file #9449

Merged
merged 2 commits into from
Feb 15, 2018

Conversation

stuartcarnie
Copy link
Contributor

@stuartcarnie stuartcarnie commented Feb 15, 2018

Added a new option for the [http] service configuration to redirect request logging to a separate file, to address part of #9438

Add a way to split out HTTP logs into a separate access log.

The new key is as follows

[http]
  # When HTTP request logging is enabled, this option specifies the path where 
  # log entries should be written. If unspecified, the default is to write to stderr, which
  # intermingles HTTP logs with internal InfluxDB logging.
  #
  # If influxd is unable to access the specified path, it will log an error and fall back to writing
  # the request log to stderr.
  # access-log-path = ""

NOTES:

  • when request logging is redirected to a file, the [httpd] prefix is stripped, so access log parsing tools like lnav can render them without additional modification.
  • to rotate the log file, use the copytruncate method of logrotate or similar to leave the original file in place.

@stuartcarnie stuartcarnie changed the title Added option to write HTTP request logs to separate file. Added option to write HTTP request logs to separate file Feb 15, 2018
Copy link
Contributor

@aanthony1243 aanthony1243 left a comment

Choose a reason for hiding this comment

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

LGTM

@stuartcarnie
Copy link
Contributor Author

I improved the config help

@stuartcarnie stuartcarnie merged commit 6104597 into master Feb 15, 2018
@ghost ghost removed the review label Feb 15, 2018
@stuartcarnie stuartcarnie deleted the sgc-access-log branch February 15, 2018 17:59
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