Saifullah khan
Saifullah khan

Reputation: 778

Custom error log in apache2

In apache log file I am getting long messages such as:

[Wed Feb 21 19:32:18.916451 2018] [:error] [pid 23919] [client 10.0.2.2:50156] Error Message...

How I can get custom log message like:

Format:[Time] [Message]

[19:32:18] Error Message....

Upvotes: 0

Views: 445

Answers (1)

Andra
Andra

Reputation: 136

Put
ErrorLogFormat "[%{c}t] %M"
in apache config file (supposedly, /etc/apache2/apache2.conf)
Other formatting options you can find in https://httpd.apache.org/docs/2.4/mod/core.html#errorlogformat

Upvotes: 1

Related Questions