Skip to content

Commit

Permalink
Log plugin/scraper scopes at debug level
Browse files Browse the repository at this point in the history
  • Loading branch information
Maista6969 committed Oct 19, 2023
1 parent 109202e commit b1e9e36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/plugin/raw.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (t *rawPluginTask) Start() error {
go t.handlePluginStderr(t.plugin.Name, stderr)
t.cmd = cmd

logger.Infof("Plugin %s started: %s", t.plugin.Name, strings.Join(cmd.Args, " "))
logger.Debugf("Plugin %s started: %s", t.plugin.Name, strings.Join(cmd.Args, " "))

// send the stdout to the plugin output
go func() {
Expand All @@ -112,7 +112,7 @@ func (t *rawPluginTask) Start() error {
errStr := err.Error()
output.Error = &errStr
}
logger.Infof("Plugin %s finished", t.plugin.Name)
logger.Debugf("Plugin %s finished", t.plugin.Name)

t.result = &output
}()
Expand Down
4 changes: 2 additions & 2 deletions pkg/scraper/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (s *scriptScraper) runScraperScript(ctx context.Context, inString string, o

go handleScraperStderr(s.config.Name, stderr)

logger.Infof("Scraper script <%s> started", strings.Join(cmd.Args, " "))
logger.Debugf("Scraper script <%s> started", strings.Join(cmd.Args, " "))

// TODO - add a timeout here
// Make a copy of stdout here. This allows us to decode it twice.
Expand Down Expand Up @@ -112,7 +112,7 @@ func (s *scriptScraper) runScraperScript(ctx context.Context, inString string, o
}

err = cmd.Wait()
logger.Infof("Scraper script finished")
logger.Debugf("Scraper script finished")

if err != nil {
return fmt.Errorf("%w: %v", ErrScraperScript, err)
Expand Down

0 comments on commit b1e9e36

Please sign in to comment.