-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Embedded nats servers with opt.LogFile have no logging #5411
Comments
I am not sure if this is a problem with options, I tried to add other options, but the log is still not recorded. nastServer.SetLoggerV2(logger.NewFileLogger(natsLogPath, true, false, true, true, logger.LogUTC(false)), false, true, false) Now that the presentation has solved the problem, the log is recorded:
|
If you want to use the logging options in Then you shouldn't need to call |
Observed behavior
Use an embedded nats server with opt.LogFile but logging is not logged
Expected behavior
The expected behavior is to see logging content in the specified log file, such as the following:
[1] 2024/05/13 11:48:57.455246 [TRC] 127.0.0.1:48990-cid :5 - <<- [SUB statisticUpdate 1]
Server and client version
tested with nats-server v2.10.12 and nats v1.33.1
Host environment
linux
Steps to reproduce
The text was updated successfully, but these errors were encountered: