Integrate NATS with event subsystem
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
19
execution/log.go
Normal file
19
execution/log.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package execution
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/docker/containerd/log"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
var ctx context.Context
|
||||
|
||||
func GetLogger(module string) *logrus.Entry {
|
||||
if ctx == nil {
|
||||
ctx = log.WithModule(context.Background(), "execution")
|
||||
}
|
||||
|
||||
subCtx := log.WithModule(ctx, module)
|
||||
return log.GetLogger(subCtx)
|
||||
}
|
||||
Reference in New Issue
Block a user