open-nomad/command/agent/log_file_windows.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
412 B
Go
Raw Normal View History

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package agent
import (
"os"
"time"
)
func (l *logFile) createTime(stat os.FileInfo) time.Time {
// Use `ModTime` as an approximation if the exact create time is not
// available.
// On Windows, the file create time is not updated after the active log
// rotates, so use `ModTime` as an approximation as well.
return stat.ModTime()
}