Your question
I want to enable DEBUG logs to console but i have healthchecks enabled on /healthz/live and /healthz/ready.
/healthz/ creates a lot of logs that make it hard to diagnose and troubleshoot, is it possible to configure somewhere those logs to disable or make them TRACE.
Other endpoints should still be logged so i would like to keep (http.connection-start / http.connection-end) to see other endpoints being called.
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
on
This is directly solvable using Stalwart’s event filters on your tracer. Each tracer supports an events list and an eventsPolicy field that lets you either include or exclude specific events.
Here’s the approach for your use case:
-
Find the event ID(s) for /healthz/ requests. Check the Events reference page for the relevant HTTP health-check event identifiers.
-
Set an exclude policy on your console tracer. In the WebUI under Settings → Telemetry → Tracers, edit your console (Stdout) tracer and:
- Set
eventsPolicy to exclude
- Add the healthz-related event IDs to the
events list
This will suppress only those health-check log lines while keeping everything else — including http.connection-start and http.connection-end — visible at your chosen debug level.
-
If you need finer control, you could configure a second tracer (e.g. a log file) with an include policy for just the events you care about, running in parallel with the console tracer.
The key doc sections are:
This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong. If you found it useful, mention @helpbot in any reply to ask follow-up questions and the bot will respond again.
Yes, you can change the default log level of those events to trace. This can be done from the WebUI.
From the documentation and management UI, i can see http.connection-start and http.connection-end events in admin/Settings/x:EventTracingLevel/new and admin/Settings/x:Tracer
so i can exclude them or set them as TRACE, which is helpful but the issue is we can’t filter to only 1 endpoint like /healthz/live - this means it’s all or nothing. and keeping the other endpoints as DEBUG not possible.
I guess with the current implementation the filters would apply to all http.connection-start, maybe a future enhancement?