Skip to content

Commit

Permalink
feat(yatas): added debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
StanGirard committed Oct 12, 2022
1 parent 378d365 commit eb32a4c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@ func RunPlugin(pluginInput commons.Plugin, c *commons.Config) []commons.Tests {
for _, plugin := range c.Plugins {
pluginMap[strings.ToLower(plugin.Name)] = &commons.YatasPlugin{}
}
// Check env variable yatas-log-level
logLevel := os.Getenv("YATAS_LOG_LEVEL")
if logLevel == "" {
logLevel = "OFF"
}

logger := hclog.New(&hclog.LoggerOptions{
Name: "plugin",
Output: os.Stdout,
Level: hclog.Off,
Level: hclog.LevelFromString(logLevel),
})

// We're a host! Start by launching the plugin process.
Expand Down

0 comments on commit eb32a4c

Please sign in to comment.