Closed iamshreeram closed 3 months ago
You need to configure the logger to initialize logging, also supports passing in your own logger.
@ripienaar , Thank you for the prompt reply.
I did have ns.ConfigureLogger()
in place, but the issue was with the Options. I mistakenly used TraceVerbose
instead of Trace
. Correcting this with the snippet below resolved the problem.
natsServer := natsserver.NewNatsServer()
ns := natsServer.StartNatsServer(&server.Options{Trace: true})
ns.ConfigureLogger()
defer ns.WaitForShutdown()
Observed behavior
When a message is posted to a given subject inside the NATS Embedded server, the trace or debug options do not print any details.
Expected behavior
I expect the payload to be printed when a message is posted to a given subject inside the NATS Embedded server, enabling effective debugging and message logging.
Server and client version
Server : 2.10 Client : 1.35
Host environment
Mac
Steps to reproduce
Start the embedded server with Trace or debug option like below -