From b74cc18aa6cc9895d7aec8e5ac463d384cc20f07 Mon Sep 17 00:00:00 2001 From: Jordan Rash <15827604+jordan-rash@users.noreply.github.com> Date: Fri, 3 Jan 2025 15:03:16 -0700 Subject: [PATCH] fixes system logging subject (#480) Signed-off-by: Jordan Rash --- cmd/nex/logger.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/nex/logger.go b/cmd/nex/logger.go index 885ac889..09992d40 100644 --- a/cmd/nex/logger.go +++ b/cmd/nex/logger.go @@ -10,6 +10,7 @@ import ( "disorder.dev/shandler" "github.com/nats-io/nats.go" + "github.com/synadia-io/nex/models" ) func configureLogger(cfg *Globals, nc *nats.Conn, serverPublicKey string, showSystemLogs, hideWorkloadLogs bool) *slog.Logger { @@ -85,8 +86,8 @@ func configureLogger(cfg *Globals, nc *nats.Conn, serverPublicKey string, showSy } } if slices.Contains(cfg.Target, "nats") { - natsLogSubject := fmt.Sprintf("$NEX.logs.%s.stdout", serverPublicKey) - natsErrLogSubject := fmt.Sprintf("$NEX.logs.%s.stderr", serverPublicKey) + natsLogSubject := fmt.Sprintf("%s.%s.%s.stdout", models.LogAPIPrefix, models.NodeSystemNamespace, serverPublicKey) + natsErrLogSubject := fmt.Sprintf("%s.%s.%s.stderr", models.LogAPIPrefix, models.NodeSystemNamespace, serverPublicKey) stdoutWriters = append(stdoutWriters, NewNatsLogger(nc, natsLogSubject)) stderrWriters = append(stderrWriters, NewNatsLogger(nc, natsErrLogSubject)) }