feat(cmd/joj3): default actor name & actor id placeholder
All checks were successful
submodules sync / sync (push) Successful in 1m0s
build / build (push) Successful in 2m31s
build / trigger-build-image (push) Successful in 12s

This commit is contained in:
张泊明518370910136 2025-06-30 17:36:48 -04:00
parent 1b6fc08451
commit 439e64be0c
GPG Key ID: D47306D7062CDA9D

View File

@ -3,6 +3,7 @@ package main
import ( import (
"context" "context"
"encoding/csv" "encoding/csv"
"fmt"
"io" "io"
"log/slog" "log/slog"
"os" "os"
@ -55,6 +56,8 @@ func (h *multiHandler) WithGroup(name string) slog.Handler {
} }
func newSlogAttrs(csvPath string) (attrs []slog.Attr) { func newSlogAttrs(csvPath string) (attrs []slog.Attr) {
env.Attr.ActorName = fmt.Sprintf("Name(%s)", env.Attr.Actor)
env.Attr.ActorID = fmt.Sprintf("ID(%s)", env.Attr.Actor)
attrs = []slog.Attr{ attrs = []slog.Attr{
slog.String("runID", env.Attr.RunID), slog.String("runID", env.Attr.RunID),
slog.String("confName", env.Attr.ConfName), slog.String("confName", env.Attr.ConfName),