@cryptotaxi247 / netdata-1 / commits / d5143c157

fix log2journal incorrect log (#16460)

Costa Tsaousis committed Nov 22, 2023 at 21:56 UTC d5143c15730094b1f2d89783b2e626ec1d4e9b0c
1 file changed +4 -1
libnetdata/log/log2journal.c
+4 -1
@@ -386,7 +386,10 @@ static inline bool jb_pcre2_match(pcre2_code *re, pcre2_match_data *match_data,
386 if(rc < 0) {
387 PCRE2_UCHAR errbuf[1024];
388 pcre2_get_error_message(rc, errbuf, sizeof(errbuf));
389 - log2stderr("PCRE2 error %d: %s on: %s", rc, errbuf, line);
389 +
390 + if(log)
391 + log2stderr("PCRE2 error %d: %s on: %s", rc, errbuf, line);
392 +
393 return false;
394 }
395