mirror of
https://github.com/caddyserver/caddy.git
synced 2025-06-09 08:35:17 -04:00
Log restarts
This commit is contained in:
parent
a6abec8210
commit
cf06abd691
@ -32,6 +32,8 @@ func init() {
|
|||||||
// work if executing with `go run`, since the binary is cleaned up
|
// work if executing with `go run`, since the binary is cleaned up
|
||||||
// when `go run` sees the initial parent process exit.
|
// when `go run` sees the initial parent process exit.
|
||||||
func Restart(newCaddyfile Input) error {
|
func Restart(newCaddyfile Input) error {
|
||||||
|
log.Println("[INFO] Restarting")
|
||||||
|
|
||||||
if newCaddyfile == nil {
|
if newCaddyfile == nil {
|
||||||
caddyfileMu.Lock()
|
caddyfileMu.Lock()
|
||||||
newCaddyfile = caddyfile
|
newCaddyfile = caddyfile
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
package caddy
|
package caddy
|
||||||
|
|
||||||
|
import "log"
|
||||||
|
|
||||||
// Restart restarts Caddy forcefully using newCaddyfile,
|
// Restart restarts Caddy forcefully using newCaddyfile,
|
||||||
// or, if nil, the current/existing Caddyfile is reused.
|
// or, if nil, the current/existing Caddyfile is reused.
|
||||||
func Restart(newCaddyfile Input) error {
|
func Restart(newCaddyfile Input) error {
|
||||||
|
log.Println("[INFO] Restarting")
|
||||||
|
|
||||||
if newCaddyfile == nil {
|
if newCaddyfile == nil {
|
||||||
caddyfileMu.Lock()
|
caddyfileMu.Lock()
|
||||||
newCaddyfile = caddyfile
|
newCaddyfile = caddyfile
|
||||||
|
Loading…
x
Reference in New Issue
Block a user