Skip to content

Commit

Permalink
fixes system logging subject
Browse files Browse the repository at this point in the history
Signed-off-by: Jordan Rash <jordan@synadia.com>
  • Loading branch information
jordan-rash committed Jan 3, 2025
1 parent 82fac7b commit afd5d93
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/nex/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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))
}
Expand Down

0 comments on commit afd5d93

Please sign in to comment.