summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgjoranv <gv@verizonmedia.com>2022-04-01 23:36:07 +0200
committergjoranv <gv@verizonmedia.com>2022-06-08 11:45:20 +0200
commit32deac2890fd22a70319a88e2a924f6c04bbce77 (patch)
tree08a8cbfe73b8b26813e0c2e397c20894eacf8ff1
parent06dee065c240d853c2032b37240557f34acb871e (diff)
Replace deprecated LogRecord.setThreadID -> setLongThreadID
-rw-r--r--jdisc_core/src/test/java/com/yahoo/jdisc/core/OsgiLogHandlerTestCase.java4
-rw-r--r--vespalog/src/test/java/com/yahoo/log/VespaFormatterTestCase.java6
2 files changed, 5 insertions, 5 deletions
diff --git a/jdisc_core/src/test/java/com/yahoo/jdisc/core/OsgiLogHandlerTestCase.java b/jdisc_core/src/test/java/com/yahoo/jdisc/core/OsgiLogHandlerTestCase.java
index 6ae377a91a4..7c07623814e 100644
--- a/jdisc_core/src/test/java/com/yahoo/jdisc/core/OsgiLogHandlerTestCase.java
+++ b/jdisc_core/src/test/java/com/yahoo/jdisc/core/OsgiLogHandlerTestCase.java
@@ -86,7 +86,7 @@ public class OsgiLogHandlerTestCase {
record.setSequenceNumber(69);
record.setSourceClassName("sourceClassName");
record.setSourceMethodName("sourceMethodName");
- record.setThreadID(69);
+ record.setLongThreadID(69L);
Throwable thrown = new Throwable();
record.setThrown(thrown);
log.log(record);
@@ -116,7 +116,7 @@ public class OsgiLogHandlerTestCase {
assertEquals(69L, ref.getProperty("SEQUENCE_NUMBER"));
assertEquals("sourceClassName", ref.getProperty("SOURCE_CLASS_NAME"));
assertEquals("sourceMethodName", ref.getProperty("SOURCE_METHOD_NAME"));
- assertEquals(69, ref.getProperty("THREAD_ID"));
+ assertEquals(69L, ref.getProperty("THREAD_ID"));
assertSame(thrown, ref.getProperty("THROWN"));
assertNull(ref.getProperty("unknown"));
}
diff --git a/vespalog/src/test/java/com/yahoo/log/VespaFormatterTestCase.java b/vespalog/src/test/java/com/yahoo/log/VespaFormatterTestCase.java
index 95a06ab2535..859e644c419 100644
--- a/vespalog/src/test/java/com/yahoo/log/VespaFormatterTestCase.java
+++ b/vespalog/src/test/java/com/yahoo/log/VespaFormatterTestCase.java
@@ -41,7 +41,7 @@ public class VespaFormatterTestCase {
testRecord1 = new LogRecord(Level.INFO, "this is a test");
testRecord1.setInstant(Instant.ofEpochMilli(1098709021843L));
- testRecord1.setThreadID(123);
+ testRecord1.setLongThreadID(123L);
expected1 = "1098709021.843000\t"
+ hostname + "\t"
@@ -64,7 +64,7 @@ public class VespaFormatterTestCase {
testRecord2 = new LogRecord(Level.INFO, "this is a test");
testRecord2.setInstant(Instant.ofEpochMilli(1098709021843L));
- testRecord2.setThreadID(123);
+ testRecord2.setLongThreadID(123L);
testRecord2.setLoggerName("org.foo");
expected3 = "1098709021.843000\t"
@@ -110,7 +110,7 @@ public class VespaFormatterTestCase {
LogRecord testRecord = new LogRecord(Level.INFO, "this {1} is {0} test");
testRecord.setInstant(Instant.ofEpochMilli(1098709021843L));
- testRecord.setThreadID(123);
+ testRecord.setLongThreadID(123L);
testRecord.setLoggerName("org.foo");
Object[] params = { "a small", "message" };
testRecord.setParameters(params);