This repository has been archived by the owner on Jun 16, 2021. It is now read-only.
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.
Open
Description
Hi, I can't seem to be able to get libcompose to respect my logger settings.
If I do smth like:
import (
"github.com/sirupsen/logrus"
...
)
func main() {
logger := logrus.New()
logger.Formatter = &logrus.JSONFormatter{}
logger.SetLevel(logrus.ErrorLevel)
// use logrus for standard log output:
log.SetOutput(logger.Writer())
cd, err := data.Asset("docker-compose.yaml")
if err != nil {
log.Fatal(err)
}
dctx := &ctx.Context{
Context: project.Context{
ComposeBytes: [][]byte{cd},
ProjectName: "test",
},
}
prj, err := docker.NewProject(dctx, nil)
if err != nil {log.Fatal(err)
}
err = prj.Up(context.Background(), options.Up{})
if err != nil {
log.Fatal(err)
}
}
typically libraries using logrus would respect my logger settings (level & format).
I can't get it working with libcompose
, for some reason I'll still see all the logs from info level above with default formatting.
Any idea why is this not working/how I can suppress logs from libcompose? Any help appreciated, cheers.