Skip to content

Commit

Permalink
chore: remove fmt printfs added previously
Browse files Browse the repository at this point in the history
Signed-off-by: Frederico Araujo <[email protected]>
  • Loading branch information
araujof committed Apr 30, 2024
1 parent ae1903a commit eef0d11
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 12 deletions.
1 change: 0 additions & 1 deletion driver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions driver/otel/filedriver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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()
}
Expand Down
3 changes: 0 additions & 3 deletions driver/pipeline/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions driver/pipeline/plugincache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit eef0d11

Please sign in to comment.