Skip to content

Commit

Permalink
[linstor-drbd-wait] debug
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan.Makeev <[email protected]>
  • Loading branch information
Ranger-X committed Nov 18, 2024
1 parent bc1fa89 commit 44a4f4b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions images/linstor-drbd-wait/src/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ func getEnv(envName string, defaultValue string) string {
func mainExecution(log *logger.Logger, filePath string, fileContent string, waitingMsg string, sleepSec int64) int {
log.Info(fmt.Sprintf("Go Version:%s ", goruntime.Version()))
log.Info(fmt.Sprintf("OS/Arch:Go OS/Arch:%s/%s ", goruntime.GOOS, goruntime.GOARCH))
log.Info(fmt.Sprintf("Start to watch file '%s' for string '%s'", filePath, fileContent))

for {
// Open the file for reading
Expand Down Expand Up @@ -85,6 +86,7 @@ func mainExecution(log *logger.Logger, filePath string, fileContent string, wait

// If string found, exit the loop
if found {
log.Debug(fmt.Sprintf("Found string '%s' in file '%s'", fileContent, filePath))
break
}

Expand Down

0 comments on commit 44a4f4b

Please sign in to comment.