Skip to content

Commit

Permalink
Automated commit by Forgejo Actions - Personal Bot
Browse files Browse the repository at this point in the history
  • Loading branch information
poniatowski-bot committed Nov 9, 2023
1 parent 12341d8 commit c76895c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion boillog.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ func LogIt(logFunction string, logOutput string, message string) {

// Logger This function is called by Logit and prints/writes logs
func logger(logFunction string, logOutput string, message string, w io.Writer) error {
timeNow := time.Now()
handler := slog.NewTextHandler(w, nil)
logger := slog.New(handler)
ctx := context.Background()
ctx = context.WithValue(ctx, slog.TimeKey, time.Now())
ctx = context.WithValue(ctx, slog.TimeKey, timeNow)
ctx = context.WithValue(ctx, FuncKey, logFunction)
switch logOutput {
case "INFO":
Expand Down

0 comments on commit c76895c

Please sign in to comment.