Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get apache logs as csv file

Tags:

apache

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

access.log->access_log.csv
error.log->error_log.csv
like image 829
lgt Avatar asked Feb 19 '23 17:02

lgt


1 Answers

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.

like image 180
Pekka Avatar answered Mar 28 '23 16:03

Pekka