Compare commits

..

No commits in common. "6b3ebebecb38642ea3d54286367b364b0a0d476d" and "0f40da5efad8839db531ab279138cd9b449b28d7" have entirely different histories.

2 changed files with 2 additions and 14 deletions

View File

@ -147,11 +147,6 @@ func setupSlog(conf *conf.Conf) error {
if logPath != "" {
slog.Info("debug log", "path", logPath)
}
slog.LogAttrs(
context.Background(),
slog.LevelInfo,
"setup slog attrs",
attrs...,
)
slog.LogAttrs(context.TODO(), slog.LevelInfo, "setup slog attrs", attrs...)
return nil
}

View File

@ -1,7 +1,6 @@
package log
import (
"context"
"encoding/json"
"fmt"
"log/slog"
@ -12,7 +11,6 @@ import (
type Conf struct {
FileName string `default:"stdout"`
Msg string `default:"log msg"`
Level int `default:"0"`
}
type Log struct{}
@ -32,12 +30,7 @@ func Parse(executorResult stage.ExecutorResult, conf Conf) stage.ParserResult {
for key, value := range data {
args = append(args, key, value)
}
slog.Default().Log(
context.Background(),
slog.Level(conf.Level),
conf.Msg,
args...,
)
slog.Info(conf.Msg, args...)
return stage.ParserResult{
Score: 0,
Comment: "",