How to know when Caddy is ready

We’re working on a utility to manage Caddy on a host of websites. When reading the stdout of the Caddy process, there’s no sign of when Caddy is ready and/or if there’s an error. On startup it logs the domains, but on a reload (sigusr1) it doesn’t log anything.

Is there a way to determine when Caddy has (re)loaded the config and is listening on all domains?

Do you have the -log flag enabled?

With caddy -log stdout on the command line, and sending a USR1 signal to the process, I see:

2017/11/04 18:14:40 [INFO] SIGUSR1: Reloading
2017/11/04 18:14:40 [INFO] Reloading
2017/11/04 18:14:40 [INFO] Reloading complete
2017/11/04 18:14:40 http: Server closed

I completely missed that -log could be set to stdout. Thanks!

1 Like

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