mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 18:43:10 -06:00
Fix mappings in logrus jetstream adapter
Clarify SetLogger call in jetstream Signed-off-by: David Schneider <dsbrng25b@gmail.com>
This commit is contained in:
parent
87a2068e1a
commit
5d2f03f01b
|
|
@ -22,11 +22,11 @@ func (l *LogAdapter) Noticef(format string, v ...interface{}) {
|
|||
}
|
||||
|
||||
func (l *LogAdapter) Warnf(format string, v ...interface{}) {
|
||||
l.entry.Errorf(format, v...)
|
||||
l.entry.Warnf(format, v...)
|
||||
}
|
||||
|
||||
func (l *LogAdapter) Fatalf(format string, v ...interface{}) {
|
||||
l.entry.Errorf(format, v...)
|
||||
l.entry.Fatalf(format, v...)
|
||||
}
|
||||
|
||||
func (l *LogAdapter) Errorf(format string, v ...interface{}) {
|
||||
|
|
|
|||
|
|
@ -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.SetLogger(NewLogAdapter(), false, false)
|
||||
s.SetLogger(NewLogAdapter(), opts.Debug, opts.Trace)
|
||||
go func() {
|
||||
process.ComponentStarted()
|
||||
s.Start()
|
||||
|
|
|
|||
Loading…
Reference in a new issue