mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-21 13:03:09 -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{}) {
|
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{}) {
|
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{}) {
|
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 {
|
if s.Server == nil {
|
||||||
var err error
|
var err error
|
||||||
s.Server, err = natsserver.NewServer(&natsserver.Options{
|
opts := &natsserver.Options{
|
||||||
ServerName: "monolith",
|
ServerName: "monolith",
|
||||||
DontListen: true,
|
DontListen: true,
|
||||||
JetStream: true,
|
JetStream: true,
|
||||||
|
|
@ -49,11 +49,12 @@ func (s *NATSInstance) Prepare(process *process.ProcessContext, cfg *config.JetS
|
||||||
MaxPayload: 16 * 1024 * 1024,
|
MaxPayload: 16 * 1024 * 1024,
|
||||||
NoSigs: true,
|
NoSigs: true,
|
||||||
NoLog: cfg.NoLog,
|
NoLog: cfg.NoLog,
|
||||||
})
|
}
|
||||||
|
s.Server, err = natsserver.NewServer(opts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
s.SetLogger(NewLogAdapter(), false, false)
|
s.SetLogger(NewLogAdapter(), opts.Debug, opts.Trace)
|
||||||
go func() {
|
go func() {
|
||||||
process.ComponentStarted()
|
process.ComponentStarted()
|
||||||
s.Start()
|
s.Start()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue