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:
@@ -53,7 +53,7 @@ func DaemonInitLogging() error {
|
||||
wwlog.SetLogLevel(level)
|
||||
}
|
||||
} else {
|
||||
wwlog.SetLogLevel(wwlog.SERV)
|
||||
wwlog.SetLogLevel(wwlog.INFO)
|
||||
}
|
||||
|
||||
conf := warewulfconf.Get()
|
||||
|
||||
@@ -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" {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user