v0.1.13 follow a replaced, removed, moved log file properly
Test / test (push) Canceled after 0s
Test / fuzz (./compat, FuzzParseFormat) (push) Canceled after 0s
Test / fuzz (./formatter, FuzzFormatJSON) (push) Canceled after 0s
Test / fuzz (./formatter, FuzzFormatTextPolicy) (push) Canceled after 0s
Test / fuzz (./sanitizer, FuzzSanitize) (push) Canceled after 0s
Test / fuzz (./sanitizer, FuzzSerializerJSON) (push) Canceled after 0s
Test / test (push) Canceled after 0s
Test / fuzz (./compat, FuzzParseFormat) (push) Canceled after 0s
Test / fuzz (./formatter, FuzzFormatJSON) (push) Canceled after 0s
Test / fuzz (./formatter, FuzzFormatTextPolicy) (push) Canceled after 0s
Test / fuzz (./sanitizer, FuzzSanitize) (push) Canceled after 0s
Test / fuzz (./sanitizer, FuzzSerializerJSON) (push) Canceled after 0s
This commit is contained in:
1 parent
fe711ed2a5
commit
f9b8770303
14 files changed
+425
-51
No files matched your search
@@ -2,6 +2,7 @@ package log
|
||||
|
||||
import (
|
||||
"io"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/lixenwraith/log/formatter"
|
||||
@@ -35,6 +36,16 @@ type TimerSet struct {
|
||||
diskInterval time.Duration
|
||||
}
|
||||
|
||||
// fileWatch records which file the processor's handle refers to. Holding file
|
||||
// keeps its address from being reused by a later handle. Processor only.
|
||||
type fileWatch struct {
|
||||
file *os.File // handle info was taken from
|
||||
info os.FileInfo // identity of file
|
||||
path string // log path for file; it changes only with a new file
|
||||
lastCheck time.Time // record time of the last path check
|
||||
warned bool // a refused or failed reopen was reported
|
||||
}
|
||||
|
||||
// sink holds the console writers in one atomic.Value; warn takes split's
|
||||
// warn-and-above records
|
||||
type sink struct {
|
||||
|
||||
Reference in new issue
Block a user