Mechanical switch from log to slog

A few obvious levels were adjusted, but generally everything mapped to "info" level.
This commit is contained in:
Daniel Hiltgen 2024-01-18 10:52:01 -08:00
parent df40b11d03
commit fedd705aea
12 changed files with 90 additions and 81 deletions

View file

@ -6,7 +6,7 @@ import (
"errors"
"fmt"
"io"
"log"
"log/slog"
)
type Command struct {
@ -59,7 +59,7 @@ func Parse(reader io.Reader) ([]Command, error) {
default:
if !bytes.HasPrefix(fields[0], []byte("#")) {
// log a warning for unknown commands
log.Printf("WARNING: Unknown command: %s", fields[0])
slog.Warn(fmt.Sprintf("Unknown command: %s", fields[0]))
}
continue
}