add config to enable/disable colored output

This commit is contained in:
Dominic Breuker
2018-03-29 08:43:13 +02:00
parent 093b9ec69c
commit 84db6dd806
5 changed files with 43 additions and 6 deletions

View File

@@ -12,8 +12,9 @@ type Config struct {
LogPS bool
DrainFor time.Duration
TriggerEvery time.Duration
Colored bool
}
func (c Config) String() string {
return fmt.Sprintf("Printing events: processes=%t | file-system-events=%t ||| Scannning for processes every %v and on inotify events ||| Watching directories: %+v (recursive) | %+v (non-recursive)", c.LogPS, c.LogFS, c.TriggerEvery, c.RDirs, c.Dirs)
return fmt.Sprintf("Printing events (colored=%t): processes=%t | file-system-events=%t ||| Scannning for processes every %v and on inotify events ||| Watching directories: %+v (recursive) | %+v (non-recursive)", c.Colored, c.LogPS, c.LogFS, c.TriggerEvery, c.RDirs, c.Dirs)
}