Logging - ignoring particular log messages

Does caddy have the ability to ignore certain log messages?

For example I don’t really want to log load balancer health checks… in Apache I did something like this:

SetEnvIf Request_Method "HEAD" dontlog
SetEnvIf Request_URI "HEAD /" dontlog
SetEnvIf Request_Method "^OPTIONS$" dontlog
# don't log requests from localhost
SetEnvIf Request_Addr "127\.0\.0\.1" dontlog
SetEnvIf Request_Addr "::1" dontlog
# behind a haproxy so log x-forwarded-for
LogFormat "%V %{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" 
CustomLog /proc/self/fd/1 proxy env=!dontlog

possible? am I missing something? If not is it a feature you think could be adopted?

To keep things simple, we don’t have that capability implemented. My philosophy is the program should log it anyway, and the reader is allowed to ignore it if he/she wants to.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.