Skip to content

Commit

Permalink
try sending to stdout instead
Browse files Browse the repository at this point in the history
  • Loading branch information
nammn committed Jun 13, 2024
1 parent 43c8d01 commit d0c65eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/readiness/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func parseHealthStatus(reader io.Reader) (health.Status, error) {
func initLogger(l *lumberjack.Logger) {
log := zap.New(zapcore.NewCore(
zapcore.NewJSONEncoder(zap.NewProductionEncoderConfig()),
zapcore.AddSync(l),
zapcore.AddSync(os.Stdout),
zap.DebugLevel,
), zap.Development())
logger = log.Sugar()
Expand Down
4 changes: 2 additions & 2 deletions pkg/readiness/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const (
DefaultAgentHealthStatusFilePath = "/var/log/mongodb-mms-automation/agent-health-status.json"
AgentHealthStatusFilePathEnv = "AGENT_STATUS_FILEPATH"

defaultLogPath = "/proc/1/fd/1"
defaultLogPath = "/var/log/mongodb-mms-automation/readiness.log"
podNamespaceEnv = "POD_NAMESPACE"
automationConfigSecretEnv = "AUTOMATION_CONFIG_MAP" //nolint
logPathEnv = "LOG_FILE_PATH"
Expand Down Expand Up @@ -71,7 +71,7 @@ func GetLogger() *lumberjack.Logger {
logger := &lumberjack.Logger{
Filename: readinessProbeLogFilePath(),
MaxBackups: readIntOrDefault(readinessProbeLoggerBackups, 5),
MaxSize: readInt(readinessProbeLoggerMaxSize),
MaxSize: readIntOrDefault(readinessProbeLoggerMaxSize, 10),
MaxAge: readInt(readinessProbeLoggerMaxAge),
}
return logger
Expand Down

0 comments on commit d0c65eb

Please sign in to comment.