]> git.giacomolli.uk - onechat/blob - daemon_log_helper_test.go
Deliver messages between parent and child agents
[onechat] / daemon_log_helper_test.go
1 package main
2
3 import (
4         "io"
5         "log/slog"
6         "sync"
7 )
8
9 // daemonTestLogger writes journal lines without a part prefix, so tests can
10 // check the level and event without a clock.
11 func daemonTestLogger(out io.Writer) *slog.Logger {
12         return slog.New(&DaemonLogHandler{
13                 out:     out,
14                 journal: true,
15                 mutex:   &sync.Mutex{},
16         })
17 }