package daemons

import (
	"bufio"
	"io"

	"github.com/rs/zerolog"
)

type Executor interface {
	PrepareMonitorExec() []string
	LaunchMonitor(args []string, l zerolog.Logger)
}

func logExecution(reader io.ReadCloser, l zerolog.Logger) {
	scanner := bufio.NewScanner(reader)
	for scanner.Scan() {
		output := scanner.Text()
		l.Debug().Msg(output)
	}
}