mirror of
https://github.com/tiennm99/tjahzi.git
synced 2026-10-13 18:16:14 +00:00
4 files changed
+10
-14
No files matched your search
@@ -22,7 +22,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.13.3</version>
|
||||
<version>2.16.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -36,7 +36,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-slf4j-impl</artifactId>
|
||||
<version>2.13.3</version>
|
||||
<version>2.16.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
+6
-7
@@ -31,17 +31,16 @@ public class Log4jAdapterLabelPrinter implements LabelPrinter {
|
||||
|
||||
@Override
|
||||
public boolean isStatic() {
|
||||
for (int i = 0; i < formatters.size(); i++) {
|
||||
for (int i = 0; i < formatters.size(); i = i + 1) {
|
||||
LogEventPatternConverter converter = formatters.get(i).getConverter();
|
||||
|
||||
if (!(converter instanceof LiteralPatternConverter)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (((LiteralPatternConverter) converter).getLiteral().contains("$")) {
|
||||
return false;
|
||||
if (converter instanceof LiteralPatternConverter) {
|
||||
if (((LiteralPatternConverter) converter).getLiteral().contains("$")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return !converter.isVariable();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
+1
-4
@@ -47,9 +47,6 @@ class LokiAppenderMonitoringTest {
|
||||
await()
|
||||
.atMost(Durations.ONE_MINUTE)
|
||||
.pollInterval(Durations.ONE_SECOND)
|
||||
.untilAsserted(() -> {
|
||||
assertThat(connectAttemptsCounter.getCount()).isEqualTo(1);
|
||||
}
|
||||
);
|
||||
.untilAsserted(() -> assertThat(connectAttemptsCounter.getCount()).isGreaterThan(0));
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -98,7 +98,7 @@ class Log4jAdapterLabelPrinterTest {
|
||||
Arguments.of("Empty", "", true),
|
||||
Arguments.of("Literal value", "literal value", true),
|
||||
Arguments.of("Literal value with variable", "Literal & variable: ${server}", false),
|
||||
Arguments.of("Contains pattern", "With pattern %c{1}", false)
|
||||
Arguments.of("Contains pattern", "With pattern %c{1}", true) // Since 2.15.0 no interpolation possible
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user