aa5ff88bbc
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
19 lines
330 B
Go
19 lines
330 B
Go
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)
|
|
}
|