From 67ab4af0a0a5d0a692738bf19737a58b2ffe10d0 Mon Sep 17 00:00:00 2001 From: Cyril Brulebois Date: Wed, 1 Mar 2023 22:36:00 +0100 Subject: [PATCH] Silence yaml patching MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Being able to patch configuration files using .local snippets is relatively new, and very useful when it comes to shipping mostly untouched configuration files, with just a few values set in a .local file. Unfortunately the initial code is very chatty and generates info-level messages in all cscli calls. An early patch upstream is ca12432a2acd2fd607e9fbea97fea3fb3f124678 (backported here), which demotes those messages from info to debug. It left the “Prepending” messages at info, but those haven't been seen with the current packages, so that's left untouched in this patch as well. Further refinement landed in cd4dabde0ec833552881dd36780ab847cf20882d but that touches more code, and we're closing in freeze-wise, so leave it alone. All our crowdsec* packages ship a README.Debian file, which should be sufficient in most cases. When in doubt, adjusting the log level in specific commands should be enough to figure out what's happening. Gbp-Pq: Name 0014-silence-yaml-patching.patch --- pkg/yamlpatch/patcher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/yamlpatch/patcher.go b/pkg/yamlpatch/patcher.go index 300488e..fb76b92 100644 --- a/pkg/yamlpatch/patcher.go +++ b/pkg/yamlpatch/patcher.go @@ -60,7 +60,7 @@ func (p *Patcher) MergedPatchContent() ([]byte, error) { return nil, err } if err == nil { - log.Infof("Patching yaml: '%s' with '%s'", p.BaseFilePath, p.PatchFilePath) + log.Debugf("Patching yaml: '%s' with '%s'", p.BaseFilePath, p.PatchFilePath) } var patched *bytes.Buffer -- 2.30.2