Simplify warewulfd logging

- Collapse SEND and RECV logs into INFO.
- Add /etc/default/warewulfd

Closes #725

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-05-24 17:10:45 -06:00
parent 983214f253
commit d33ca6ff53
7 changed files with 8 additions and 29 deletions

View File

@@ -53,7 +53,7 @@ func DaemonInitLogging() error {
wwlog.SetLogLevel(level)
}
} else {
wwlog.SetLogLevel(wwlog.SERV)
wwlog.SetLogLevel(wwlog.INFO)
}
conf := warewulfconf.Get()

View File

@@ -48,7 +48,7 @@ func ProvisionSend(w http.ResponseWriter, req *http.Request) {
return
}
wwlog.Recv("hwaddr: %s, ipaddr: %s, stage: %s", rinfo.hwaddr, req.RemoteAddr, rinfo.stage)
wwlog.Info("request from hwaddr:%s ipaddr:%s | stage:%s", rinfo.hwaddr, req.RemoteAddr, rinfo.stage)
if (rinfo.stage == "runtime" || len(rinfo.overlay) > 0) && conf.Warewulf.Secure {
if rinfo.remoteport >= 1024 {
@@ -276,7 +276,7 @@ func ProvisionSend(w http.ResponseWriter, req *http.Request) {
wwlog.ErrorExc(err, "")
}
wwlog.Send("%15s: %s", remoteNode.Id(), stage_file)
wwlog.Info("send %s -> %s", stage_file, remoteNode.Id())
} else {
if rinfo.compress == "gz" {

View File

@@ -39,7 +39,7 @@ func sendFile(
stat.ModTime(),
fd)
wwlog.Send("%15s: %s", sendto, filename)
wwlog.Info("send %s -> %s", filename, sendto)
req.Body.Close()
return nil
}