Give a logger to State and add debug logs

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
This commit is contained in:
Itxaka
2023-02-04 10:33:58 +01:00
parent 8973979ceb
commit 93ceae89a2
2 changed files with 26 additions and 12 deletions

View File

@@ -23,10 +23,10 @@ Sends a generic event payload with the configuration found in the scanned direct
Aliases: []string{},
Flags: []cli.Flag{},
Action: func(c *cli.Context) error {
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr}).With().Caller().Logger()
g := herd.DAG()
s := &mount.State{Rootdir: "/"}
s := &mount.State{Logger: log.Logger, Rootdir: "/"}
s.Register(g)