mirror of
https://github.com/safing/portbase
synced 2025-09-01 01:59:48 +00:00
Add log writer triggering
This commit is contained in:
parent
f29bd54976
commit
aaa7aaf648
2 changed files with 5 additions and 0 deletions
|
@ -20,6 +20,8 @@ var (
|
|||
|
||||
mediumPriorityClearance = make(chan struct{})
|
||||
lowPriorityClearance = make(chan struct{})
|
||||
|
||||
triggerLogWriting = log.TriggerWriterChannel()
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -138,6 +140,8 @@ microTaskManageLoop:
|
|||
select {
|
||||
case taskTimeslot <- struct{}{}:
|
||||
continue microTaskManageLoop
|
||||
case triggerLogWriting <- struct{}{}:
|
||||
continue microTaskManageLoop
|
||||
case mediumPriorityClearance <- struct{}{}:
|
||||
case lowPriorityClearance <- struct{}{}:
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ func Start() error {
|
|||
}
|
||||
|
||||
// start logging
|
||||
log.EnableScheduling()
|
||||
err = log.Start()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "CRITICAL ERROR: failed to start logging: %s\n", err)
|
||||
|
|
Loading…
Add table
Reference in a new issue