Closed siegfriedweber closed 5 months ago
If I understand you correctly this is potentially an upstream issue?
If Vector produces an extra field to mark this, this would stabilize our tests while retaining the ability to see how often it occured, as we can then filter for it in OpenSearch, correct?
If correct that would sound to me like an okay compromise..
If I understand you correctly this is potentially an upstream issue?
Yes, it seems. Surprisingly all the logging frameworks are affected and I have not found according bug reports. So I would be careful about blaming upstream for this. There could also be incompatible JARs in our classpath.
If Vector produces an extra field to mark this, this would stabilize our tests while retaining the ability to see how often it occured, as we can then filter for it in OpenSearch, correct?
Correct.
The XML log files produced by log4j 1.x, log4j 2.x and logback are invalid in rare cases. The XML snippets cannot be parsed by Vector and the fields like logger and level cannot be set in the resulting log event.
This is usually the root cause if the logging tests fail with the following error:
Examples of invalid XML
Log events pushed into each other
It happens relatively often that two log events are pushed into each other.
Unexpected line endings
Log4j 1.x and 2.x use the line delimiter
\n
within a log event and\r\n
between the log events:The line delimiter
\r\n
is used by Vector to extract the single log events. This is actually more reliable in Vector than trying to find the closing tag</log4j:event>
.In really rare cases, the line delimiter seems to be
\n
or\r
between the log4j events. However, this is not confirmed yet.Action
There are the following options to close this issue:
Tasks