You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/logging/logfile_windows.go

18 lines
415 B

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package logging
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()
}