Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions pkg/logger/log/accesslog.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,26 +75,29 @@ func init() {
value, err := strconv.ParseInt(s, 0, 64)
if err != nil {
logrus.Errorf("Parse FULL_ACCESS_LOG_MAX_BODY_SIZE env error: %v", err)
} else {
FullAccessLogMaxBodySize = int(value)
}
FullAccessLogMaxBodySize = int(value)
}

FullAccessLogRequestBodyEnabled = true
if s, exists := os.LookupEnv("FULL_ACCESS_LOG_REQUEST_BODY_ENABLED"); exists {
value, err := strconv.ParseBool(s)
if err != nil {
logrus.Errorf("Parse FULL_ACCESS_LOG_REQUEST_BODY_ENABLED env error: %v", err)
} else {
FullAccessLogRequestBodyEnabled = value
}
FullAccessLogRequestBodyEnabled = value
}

FullAccessLogResponseBodyEnabled = true
if s, exists := os.LookupEnv("FULL_ACCESS_LOG_RESPONSE_BODY_ENABLED"); exists {
value, err := strconv.ParseBool(s)
if err != nil {
logrus.Errorf("Parse FULL_ACCESS_LOG_RESPONSE_BODY_ENABLED env error: %v", err)
} else {
FullAccessLogResponseBodyEnabled = value
}
FullAccessLogResponseBodyEnabled = value
}
}

Expand Down