From eef0d113faeb09ad47c6caa555c36b1b0fdacbb6 Mon Sep 17 00:00:00 2001 From: Frederico Araujo Date: Tue, 30 Apr 2024 11:56:52 -0400 Subject: [PATCH] chore: remove fmt printfs added previously Signed-off-by: Frederico Araujo --- driver/main.go | 1 - driver/otel/filedriver.go | 7 +------ driver/pipeline/pipeline.go | 3 --- driver/pipeline/plugincache.go | 2 -- 4 files changed, 1 insertion(+), 12 deletions(-) diff --git a/driver/main.go b/driver/main.go index f64e1767..ad8ad854 100644 --- a/driver/main.go +++ b/driver/main.go @@ -134,7 +134,6 @@ func run() int { // load pipeline pl = pipeline.New(*driverDir, *pluginDir, *configFile) - fmt.Printf("Driver dir is: %s\n", pipeline.DriverDir) if *inputType == "socket" { emptyType := "" inputType = &emptyType diff --git a/driver/otel/filedriver.go b/driver/otel/filedriver.go index 10422271..5ee66fd3 100644 --- a/driver/otel/filedriver.go +++ b/driver/otel/filedriver.go @@ -109,7 +109,6 @@ func (s *FileDriver) Run(path string, running *bool) error { } var otpLogs []*otp.ResourceLogs - for _, fn := range files { logger.Trace.Println("Loading file: " + fn) s.file, err = os.Open(fn) @@ -122,26 +121,22 @@ func (s *FileDriver) Run(path string, running *bool) error { logger.Error.Println("File read error: ", err) return err } - err = json.Unmarshal(bytes, &otpLogs) if err != nil { logger.Error.Println("Error unmarshaling into OTP ResourceLogs: ", err) return err } - for _, otl := range otpLogs { if !*running { break } records <- otl } - s.file.Close() if !*running { break } } - logger.Error.Println("Closing main channel") if records != nil { close(records) @@ -152,7 +147,7 @@ func (s *FileDriver) Run(path string, running *bool) error { // Cleanup tears down the driver resources. func (s *FileDriver) Cleanup() { - fmt.Println("Exiting ", fileDriverName) + logger.Trace.Println("Exiting ", fileDriverName) if s.file != nil { s.file.Close() } diff --git a/driver/pipeline/pipeline.go b/driver/pipeline/pipeline.go index 41d34dbd..28447de0 100644 --- a/driver/pipeline/pipeline.go +++ b/driver/pipeline/pipeline.go @@ -82,7 +82,6 @@ func (pl *Pipeline) AddChannel(channelName string, channel interface{}) { // Load loads and enables the pipeline func (pl *Pipeline) Load(driverName string) error { conf, err := pl.pluginCache.GetConfig() - fmt.Printf("--Config drivers %s\n", conf.Drivers) if err != nil { logger.Error.Println("Unable to load pipeline config: ", err) @@ -100,8 +99,6 @@ func (pl *Pipeline) Load(driverName string) error { logger.Error.Println("Unable to load driver: ", err) return err } - fmt.Printf("Adding driver in if %s\n", driverName) - pl.drivers = append(pl.drivers, driver) } else { for _, d := range conf.Drivers { diff --git a/driver/pipeline/plugincache.go b/driver/pipeline/plugincache.go index 72539b53..30cb9eda 100644 --- a/driver/pipeline/plugincache.go +++ b/driver/pipeline/plugincache.go @@ -161,8 +161,6 @@ func (p *PluginCache) GetConfig() (*Config, error) { } p.updateConfigFromEnv() - fmt.Printf("Config drivers %s\n", p.config.Drivers) - return p.config, nil }