mirror of https://github.com/hashicorp/consul
15 lines
344 B
Go
15 lines
344 B
Go
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()
|
|
}
|