Improve logging in tests

Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
Steffen Vogel
2023-07-06 08:51:44 +02:00
parent 1c55345b3f
commit bd8890ca0f
3 changed files with 14 additions and 18 deletions

View File

@@ -103,7 +103,7 @@ func (a *Agent) Start(_, dir string, extraArgs ...any) error {
"daemon", "daemon",
"--rpc-socket", rpcSockPath, "--rpc-socket", rpcSockPath,
"--rpc-wait", "--rpc-wait",
"--log-level", "debug", "--log-level", "debug5",
"--sync-hosts=false", "--sync-hosts=false",
) )
args = append(args, a.ExtraArgs...) args = append(args, a.ExtraArgs...)
@@ -112,9 +112,6 @@ func (a *Agent) Start(_, dir string, extraArgs ...any) error {
copt.Combined(a.logFile), copt.Combined(a.logFile),
copt.Dir(dir), copt.Dir(dir),
copt.EnvVar("CUNICU_EXPERIMENTAL", "1"), copt.EnvVar("CUNICU_EXPERIMENTAL", "1"),
// copt.EnvVar("PION_LOG", "info"),
copt.EnvVar("GRPC_GO_LOG_SEVERITY_LEVEL", "debug"),
copt.EnvVar("GRPC_GO_LOG_VERBOSITY_LEVEL", fmt.Sprintf("%d", 99)),
) )
if a.Command, err = a.Host.Start(binary, args...); err != nil { if a.Command, err = a.Host.Start(binary, args...); err != nil {

View File

@@ -43,16 +43,18 @@ func NewCoturnNode(n *g.Network, name string, opts ...g.Option) (*CoturnNode, er
t := &CoturnNode{ t := &CoturnNode{
Host: h, Host: h,
Config: map[string]string{ Config: map[string]string{
"verbose": "", "verbose": "",
"no-tls": "", "no-tls": "",
"no-dtls": "", "no-dtls": "",
"lt-cred-mech": "", "lt-cred-mech": "",
"simple-log": "", "simple-log": "",
"no-stdout-log": "", "no-stdout-log": "",
"log-file": logPath, "log-file": logPath,
"listening-port": strconv.Itoa(stun.DefaultPort), "new-log-timestamp": "",
"realm": "cunicu", "new-log-timestamp-format": "%H:%M:%S",
"cli-password": "cunicu", "listening-port": strconv.Itoa(stun.DefaultPort),
"realm": "cunicu",
"cli-password": "cunicu",
}, },
logger: log.Global.Named("node.relay").With(zap.String("node", name)), logger: log.Global.Named("node.relay").With(zap.String("node", name)),
} }

View File

@@ -60,16 +60,13 @@ func (s *GrpcSignalingNode) Start(_, dir string, extraArgs ...any) error {
args := profileArgs args := profileArgs
args = append(args, args = append(args,
"signal", "signal",
"--log-level", "debug", "--log-level", "debug5",
"--listen", fmt.Sprintf(":%d", s.port), "--listen", fmt.Sprintf(":%d", s.port),
) )
args = append(args, extraArgs...) args = append(args, extraArgs...)
args = append(args, args = append(args,
copt.Dir(dir), copt.Dir(dir),
copt.Combined(s.logFile), copt.Combined(s.logFile),
// copt.EnvVar("GOMAXPROCS", "10"),
copt.EnvVar("GRPC_GO_LOG_SEVERITY_LEVEL", "debug"),
copt.EnvVar("GRPC_GO_LOG_VERBOSITY_LEVEL", "99"),
copt.EnvVar("GORACE", fmt.Sprintf("log_path=%s-race.log", s.Name())), copt.EnvVar("GORACE", fmt.Sprintf("log_path=%s-race.log", s.Name())),
) )