Skip to content

Commit

Permalink
remove log from GetLastRebootTime
Browse files Browse the repository at this point in the history
  • Loading branch information
paulyufan2 authored and vipul-21 committed Sep 22, 2023
1 parent 6fddef1 commit 729ba91
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions platform/os_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,13 @@ func GetLastRebootTime() (time.Time, error) {
// Query last reboot time.
out, err := exec.Command("uptime", "-s").Output()
if err != nil {
// log.Printf("Failed to query uptime, err:%v", err)
return time.Time{}.UTC(), err
}

// Parse the output.
layout := "2006-01-02 15:04:05"
rebootTime, err := time.ParseInLocation(layout, string(out[:len(out)-1]), time.Local)
if err != nil {
// log.Printf("Failed to parse uptime, err:%v", err)
return time.Time{}.UTC(), err
}

Expand Down

0 comments on commit 729ba91

Please sign in to comment.