Skip to content

Commit

Permalink
Reduce log verbosity at startup (#2363)
Browse files Browse the repository at this point in the history
A configuration syntax test is performed every time the service is
started from systemd. The resulting error, if any, is shown on
journalctl logs.
This PR removes the unnecessary output in crowdsec.log generated by the
configuration test.
  • Loading branch information
mmetc authored Jul 19, 2023
1 parent bb16552 commit 3c16139
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/crowdsec/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ func Serve(cConfig *csconfig.Config, apiReady chan bool, agentReady chan bool) e
}

if flags.TestMode {
log.Infof("test done")
log.Infof("Configuration test done")
pluginBroker.Kill()
os.Exit(0)
}
Expand Down
2 changes: 1 addition & 1 deletion config/crowdsec.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=notify
Environment=LC_ALL=C LANG=C
ExecStartPre=/usr/local/bin/crowdsec -c /etc/crowdsec/config.yaml -t
ExecStartPre=/usr/local/bin/crowdsec -c /etc/crowdsec/config.yaml -t -error
ExecStart=/usr/local/bin/crowdsec -c /etc/crowdsec/config.yaml
#ExecStartPost=/bin/sleep 0.1
ExecReload=/bin/kill -HUP $MAINPID
Expand Down

0 comments on commit 3c16139

Please sign in to comment.