rewrite logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-11-04 00:38:12 +03:00
parent 7c311aea19
commit e41bb5ebc5
26 changed files with 235 additions and 387 deletions

View File

@@ -5,6 +5,7 @@ import (
"fmt"
"github.com/unistack-org/micro/v3/debug/log"
"github.com/unistack-org/micro/v3/metadata"
"github.com/unistack-org/micro/v3/util/ring"
)
@@ -94,7 +95,7 @@ func (l *memoryLog) Stream() (log.Stream, error) {
records <- log.Record{
Timestamp: entry.Timestamp,
Message: entry.Value,
Metadata: make(map[string]string),
Metadata: metadata.New(0),
}
}
// now stream continuously
@@ -102,7 +103,7 @@ func (l *memoryLog) Stream() (log.Stream, error) {
records <- log.Record{
Timestamp: entry.Timestamp,
Message: entry.Value,
Metadata: make(map[string]string),
Metadata: metadata.New(0),
}
}
}()