Skip to content

Commit

Permalink
adjust log stmt
Browse files Browse the repository at this point in the history
  • Loading branch information
tedim52 committed Oct 21, 2024
1 parent 9102416 commit b8ce98e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions engine/server/engine/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/file_layout"
"github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_consts"
"io/fs"
"math"
"net"
"net/http"
"os"
Expand Down Expand Up @@ -417,11 +416,7 @@ func getLogsDatabaseClient(kurtosisBackendType args.KurtosisBackendType, kurtosi
case args.KurtosisBackendType_Docker:
realTime := logs_clock.NewRealClock()

logRetentionPeriodInWeeks := int(math.Ceil(logRetentionPeriod.Hours() / float64(numHoursInAWeek)))
if logRetentionPeriodInWeeks < 1 {
logRetentionPeriodInWeeks = 1
}
logrus.Infof("Setting log retention period to '%v' week(s).", logRetentionPeriodInWeeks)
logrus.Infof("Setting log retention period to '%v' hours(s).", logRetentionPeriod.Hours())
osFs := volume_filesystem.NewOsVolumeFilesystem()
perHourFileLayout := file_layout.NewPerHourFileLayout(realTime, volume_consts.LogsStorageDirpath)
logFileManager := log_file_manager.NewLogFileManager(kurtosisBackend, osFs, perHourFileLayout, realTime, logRetentionPeriod, volume_consts.LogsStorageDirpath)
Expand Down

0 comments on commit b8ce98e

Please sign in to comment.