Skip to content

Instantly share code, notes, and snippets.

@AndisGrossteins
Last active January 18, 2019 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndisGrossteins/aff29036053f7f8311471921de7e7068 to your computer and use it in GitHub Desktop.
Save AndisGrossteins/aff29036053f7f8311471921de7e7068 to your computer and use it in GitHub Desktop.
Custom Apache log format for better logging and reporting by @krader1961
# --- [SNIP] ---
# Special format by @krader1961
# His comment: I use a format that provides a human readable local time and a seconds since the UNIX epoch at UTC:
LogFormat "%{%Y-%m-%dT%H:%M:%S}t %{sec}t.%{usec_frac}t %>s %{error_notes}e %D %B %h %{Host}i \"%r\" \"%{Referer}i\" \"%{User-Agent}i\"" krader_custom
# I think I've removed and recreaed his original timestamp part (or something) because it caused my Apache to crash
### USAGE:
# In the global or vhost config...
# CustomLog "/var/log/apache2/krader_custom_access_%Y-%m-%d.log" krader_custom
# --- [SNIP] ---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment