Skip to content

Commit 483f9a0

Browse files
committed
refactor(plugins): standardize logging with catcher
1 parent 17f2638 commit 483f9a0

7 files changed

Lines changed: 7 additions & 14 deletions

File tree

plugins/aws/config/config.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package config
33
import (
44
"context"
55
"fmt"
6-
"log"
76
"strings"
87
sync "sync"
98
"time"
@@ -133,7 +132,7 @@ func StartConfigurationSystem() {
133132

134133
switch message := in.Payload.(type) {
135134
case *BiDirectionalMessage_Config:
136-
log.Printf("Received configuration update: %v", message.Config)
135+
catcher.Info("Received configuration update", map[string]any{"config": message.Config})
137136
cnf = message.Config
138137
}
139138
}

plugins/azure/config/config.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package config
33
import (
44
"context"
55
"fmt"
6-
"log"
76
"strings"
87
sync "sync"
98
"time"
@@ -133,7 +132,7 @@ func StartConfigurationSystem() {
133132

134133
switch message := in.Payload.(type) {
135134
case *BiDirectionalMessage_Config:
136-
log.Printf("Received configuration update: %v", message.Config)
135+
catcher.Info("Received configuration update", map[string]any{"config": message.Config})
137136
cnf = message.Config
138137
}
139138
}

plugins/bitdefender/config/config.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"encoding/json"
66
"fmt"
7-
"log"
87
"net/http"
98
"strings"
109
sync "sync"
@@ -146,7 +145,7 @@ func StartConfigurationSystem() {
146145

147146
switch message := in.Payload.(type) {
148147
case *BiDirectionalMessage_Config:
149-
log.Printf("Received configuration update: %v", message.Config)
148+
catcher.Info("Received configuration update", map[string]any{"config": message.Config})
150149
cnf = message.Config
151150
go processConfigurations(cnf)
152151
}

plugins/gcp/config/config.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package config
33
import (
44
"context"
55
"fmt"
6-
"log"
76
"strings"
87
sync "sync"
98
"time"
@@ -133,7 +132,7 @@ func StartConfigurationSystem() {
133132

134133
switch message := in.Payload.(type) {
135134
case *BiDirectionalMessage_Config:
136-
log.Printf("Received configuration update: %v", message.Config)
135+
catcher.Info("Received configuration update", map[string]any{"config": message.Config})
137136
cnf = message.Config
138137
}
139138
}

plugins/o365/config/config.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package config
33
import (
44
"context"
55
"fmt"
6-
"log"
76
"strings"
87
sync "sync"
98
"time"
@@ -133,7 +132,7 @@ func StartConfigurationSystem() {
133132

134133
switch message := in.Payload.(type) {
135134
case *BiDirectionalMessage_Config:
136-
log.Printf("Received configuration update: %v", message.Config)
135+
catcher.Info("Received configuration update", map[string]any{"config": message.Config})
137136
cnf = message.Config
138137
}
139138
}

plugins/soc-ai/config/config.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package config
33
import (
44
"context"
55
"fmt"
6-
"log"
76
"strings"
87
sync "sync"
98
"time"
@@ -151,7 +150,7 @@ func StartConfigurationSystem() {
151150

152151
switch message := in.Payload.(type) {
153152
case *BiDirectionalMessage_Config:
154-
log.Printf("Received configuration update: %v", message.Config)
153+
catcher.Info("Received configuration update", map[string]any{"config": message.Config})
155154
updateConfigFromGRPC(message.Config)
156155
}
157156
}

plugins/sophos/config/config.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package config
33
import (
44
"context"
55
"fmt"
6-
"log"
76
"strings"
87
sync "sync"
98
"time"
@@ -133,7 +132,7 @@ func StartConfigurationSystem() {
133132

134133
switch message := in.Payload.(type) {
135134
case *BiDirectionalMessage_Config:
136-
log.Printf("Received configuration update: %v", message.Config)
135+
catcher.Info("Received configuration update", map[string]any{"config": message.Config})
137136
cnf = message.Config
138137
}
139138
}

0 commit comments

Comments
 (0)