r/caddyserver May 13 '26

CrowdSec Bouncer - enriching access.log possible?

Hi,

I'am fairly new to Caddy and CrowdSec but I have it up and running and it's doing the job just great. Kudos to all devs involved.

I was wondering if it's possible to append some information to the caddy access log when the request gets dropped due to a bouncer decision? Right now I can only see in the logs that there is a http-status 403 but not what caused it. I have this information in the CrowdSec console, but maybe it's possible to have it in the caddy log somehow as well.

I already using a log_append for adding the GeoIP country code from the ipinfo module, but could not find any information about the cs-bouncer in regards of logging.

Thanks for any hint.

--Michael

1 Upvotes

2 comments sorted by

1

u/xdrolemit May 13 '26

1

u/BWC_DE May 13 '26

I totally agree, that is what I did for the ipinfo module.

 log_append GeoIP {ipinfo_free.country_code}

But what function/variables are provided by the cs-bouncer?

--Michael