Skip to content

Commit 8e706e5

Browse files
DET-728: addressed comments
1 parent 7e7d36d commit 8e706e5

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

sumologic/sumologic_cse_first_seen_rule.go

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package sumologic
33
import (
44
"encoding/json"
55
"fmt"
6-
"log"
76
)
87

98
func (s *Client) GetCSEFirstSeenRule(id string) (*CSEFirstSeenRule, error) {
@@ -73,15 +72,6 @@ func (s *Client) OverrideCSEFirstSeenRule(CSEFirstSeenRule CSEFirstSeenRule) err
7372
CSEFirstSeenRuleOverride: CSEFirstSeenRuleOverride,
7473
}
7574

76-
// Log the request as JSON for debugging
77-
if requestJSON, err := json.MarshalIndent(request, "", " "); err == nil {
78-
// Log the request as JSON for debugging, only if DEBUG env var is set
79-
if os.Getenv("DEBUG") == "true" {
80-
if requestJSON, err := json.MarshalIndent(request, "", " "); err == nil {
81-
log.Printf("CSE First Seen Rule Override Request: %s", string(requestJSON))
82-
}
83-
}
84-
8575
_, err := s.Put(url, request)
8676

8777
return err
@@ -91,7 +81,6 @@ func toOverrideFirstSeen(CSEFirstSeenRule CSEFirstSeenRule) CSEFirstSeenRuleOver
9181
return CSEFirstSeenRuleOverride{
9282
BaselineWindowSize: CSEFirstSeenRule.BaselineWindowSize,
9383
DescriptionExpression: CSEFirstSeenRule.DescriptionExpression,
94-
// EntitySelectors: CSEFirstSeenRule.EntitySelectors, // commented out till admiral is fixed, currently not working because of an issue in admiral
9584
GroupByFields: CSEFirstSeenRule.GroupByFields,
9685
IsPrototype: CSEFirstSeenRule.IsPrototype,
9786
Name: CSEFirstSeenRule.Name,
@@ -139,9 +128,8 @@ type CSEFirstSeenRule struct {
139128
}
140129

141130
type CSEFirstSeenRuleOverride struct {
142-
BaselineWindowSize string `json:"baselineWindowSize"`
143-
DescriptionExpression string `json:"descriptionExpression"`
144-
// EntitySelectors []EntitySelector `json:"entitySelectors"` // commented out till admiral is fixed, currently not working because of an issue in admiral
131+
BaselineWindowSize string `json:"baselineWindowSize"`
132+
DescriptionExpression string `json:"descriptionExpression"`
145133
GroupByFields []string `json:"groupByFields"`
146134
IsPrototype bool `json:"isPrototype"`
147135
Name string `json:"name"`

0 commit comments

Comments
 (0)