Ensure errors and warnings are cached (#2131)

This commit is contained in:
andig 2021-12-28 14:39:29 +01:00 • committed by GitHub
parent 4c09be6553
commit 8577fa1ae9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,8 +24,7 @@ var (
log = util.NewLogger("main")
cfgFile string
ignoreErrors = []string{"warn", "error", "fatal"} // don't add to cache
ignoreMqtt = []string{"releaseNotes"} // excessive size may crash certain brokers
ignoreMqtt = []string{"releaseNotes"} // excessive size may crash certain brokers
)
// rootCmd represents the base command when called without any subcommands
@ -171,7 +170,7 @@ func run(cmd *cobra.Command, args []string) {
// value cache
cache := util.NewCache()
go cache.Run(pipe.NewDropper(ignoreErrors...).Pipe(tee.Attach()))
go cache.Run(tee.Attach())
// setup database
if conf.Influx.URL != "" {