Unify logging by using logrus for jetstream logs (#2976)
I guess tests for the logging is rather unusual so I omitted tests for this change. * [x] I have added Go unit tests or [Complement integration tests](https://github.com/matrix-org/complement) for this PR _or_ I have justified why this PR doesn't need tests * [x] Pull request includes a [sign off below using a legally identifiable name](https://matrix-org.github.io/dendrite/development/contributing#sign-off) _or_ I have already signed off privately Signed-off-by: `David Schneider <dsbrng25b@gmail.com>` --------- Signed-off-by: David Schneider <dsbrng25b@gmail.com>
This commit is contained in:
parent
d34277a6c0
commit
e6aa0955ff
2 changed files with 46 additions and 3 deletions
|
|
@ -40,7 +40,7 @@ func (s *NATSInstance) Prepare(process *process.ProcessContext, cfg *config.JetS
|
|||
}
|
||||
if s.Server == nil {
|
||||
var err error
|
||||
s.Server, err = natsserver.NewServer(&natsserver.Options{
|
||||
opts := &natsserver.Options{
|
||||
ServerName: "monolith",
|
||||
DontListen: true,
|
||||
JetStream: true,
|
||||
|
|
@ -49,11 +49,12 @@ func (s *NATSInstance) Prepare(process *process.ProcessContext, cfg *config.JetS
|
|||
MaxPayload: 16 * 1024 * 1024,
|
||||
NoSigs: true,
|
||||
NoLog: cfg.NoLog,
|
||||
})
|
||||
}
|
||||
s.Server, err = natsserver.NewServer(opts)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
s.ConfigureLogger()
|
||||
s.SetLogger(NewLogAdapter(), opts.Debug, opts.Trace)
|
||||
go func() {
|
||||
process.ComponentStarted()
|
||||
s.Start()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue