add config to enable/disable colored output

This commit is contained in:
Dominic Breuker committed 2018-03-29 08:43:13 +02:00
1 parent d585d76867
commit 2f341c5b72
5 files changed
+43 -6

No files matched your search

+2 -1
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)
}