Search code examples
apache

Get apache logs as csv file


Is there a way to save all apache logs as CSV file?

access.log->access_log.csv
error.log->error_log.csv

Solution

  • You can define a custom log format to make Apache log directly into a comma-separated format.

    You may have to fiddle with this for a while to find the right way. For example, you will probably want to use " or ' as field delimiters to prevent commas inside the field values from breaking your CSV.