Skip to content

Commit 3795aae

Browse files
committed
added default log type and updated tests
1 parent b6b27f6 commit 3795aae

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

lambda-extensions/config/config.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ type LambdaExtensionConfig struct {
3636
SourceCategoryOverride string
3737
}
3838

39-
var validLogTypes = []string{"platform", "function"}
39+
var defaultLogTypes = []string{"platform", "function"}
40+
var validLogTypes = []string{"platform", "function", "extension"}
4041

4142
// GetConfig to get config instance
4243
func GetConfig() (*LambdaExtensionConfig, error) {
@@ -93,7 +94,7 @@ func (cfg *LambdaExtensionConfig) setDefaults() {
9394
cfg.AWSLambdaRuntimeAPI = "127.0.0.1:9001"
9495
}
9596
if logTypes == "" {
96-
cfg.LogTypes = validLogTypes
97+
cfg.LogTypes = defaultLogTypes
9798
} else {
9899
cfg.LogTypes = strings.Split(logTypes, ",")
99100
}

lambda-extensions/sumoclient/sumoclient_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ func setupEnv() {
3131
os.Setenv("SUMO_MAX_DATAQUEUE_LENGTH", "10")
3232
os.Setenv("SUMO_MAX_CONCURRENT_REQUESTS", "3")
3333
os.Setenv("SUMO_LOG_LEVEL", "DEBUG")
34+
os.Setenv("SUMO_RETRY_SLEEP_TIME_MS", "50")
35+
os.Setenv("SUMO_LOG_TYPES", "function")
3436
}
3537

3638
func assertEqual(t *testing.T, a interface{}, b interface{}, message string) {

0 commit comments

Comments
 (0)