summaryrefslogtreecommitdiffstats
path: root/vespalog/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'vespalog/src/main')
-rw-r--r--vespalog/src/main/java/com/yahoo/log/LogMessage.java15
-rw-r--r--vespalog/src/main/java/com/yahoo/log/VespaFormat.java98
2 files changed, 0 insertions, 113 deletions
diff --git a/vespalog/src/main/java/com/yahoo/log/LogMessage.java b/vespalog/src/main/java/com/yahoo/log/LogMessage.java
index 878e041231c..b09cb10cd4a 100644
--- a/vespalog/src/main/java/com/yahoo/log/LogMessage.java
+++ b/vespalog/src/main/java/com/yahoo/log/LogMessage.java
@@ -70,24 +70,9 @@ public class LogMessage
}
public Instant getTimestamp() {return time;}
- /**
- * @deprecated Use {@link #getTimestamp()}
- */
- @Deprecated(since = "7", forRemoval = true)
- public long getTime () {return time.toEpochMilli();}
- /**
- * @deprecated Use {@link #getTimestamp()}
- */
- @Deprecated(since = "7", forRemoval = true)
- public long getTimeInSeconds () {return time.getEpochSecond();}
public String getHost () {return host;}
public long getProcessId() {return processId;}
public OptionalLong getThreadId() {return threadId > 0 ? OptionalLong.of(threadId) : OptionalLong.empty();}
- /**
- * @deprecated Use {@link #getProcessId()} / {@link #getThreadId()}
- */
- @Deprecated(since = "7", forRemoval = true)
- public String getThreadProcess () {return VespaFormat.formatThreadProcess(processId, threadId);}
public String getService () {return service;}
public String getComponent () {return component;}
public Level getLevel () {return level;}
diff --git a/vespalog/src/main/java/com/yahoo/log/VespaFormat.java b/vespalog/src/main/java/com/yahoo/log/VespaFormat.java
index 0ce3668223d..21fccb90ad0 100644
--- a/vespalog/src/main/java/com/yahoo/log/VespaFormat.java
+++ b/vespalog/src/main/java/com/yahoo/log/VespaFormat.java
@@ -91,108 +91,10 @@ public class VespaFormat {
}
- /**
- * @deprecated Use {@link #formatTime(Instant)} ()}
- */
- @Deprecated(since = "7", forRemoval = true)
- public static void formatTime (long time, StringBuilder sbuffer) {
- sbuffer.append(formatTime(Instant.ofEpochMilli(time)));
- }
-
public static String formatTime(Instant instant) {
return String.format("%d.%06d", instant.getEpochSecond(), instant.getNano() / 1000);
}
- @Deprecated(since = "7", forRemoval = true) // Unused - this is not the format used by the Vespa log handler
- public static String format(String levelName,
- String component,
- String componentPrefix,
- long millis,
- String threadId,
- String serviceName,
- String formattedMessage,
- Throwable t)
- {
- StringBuilder sbuf = new StringBuilder(300); // initial guess
-
- // format the time
- formatTime(millis, sbuf);
- sbuf.append("\t");
-
- sbuf.append(hostname).append("\t");
-
- sbuf.append(processID);
- if (threadId != null) {
- sbuf.append("/").append(threadId);
- }
- sbuf.append("\t");
-
- sbuf.append(serviceName).append("\t");
-
- if (component == null && componentPrefix == null) {
- sbuf.append("-");
- } else if (component == null) {
- sbuf.append(componentPrefix);
- } else if (componentPrefix == null) {
- sbuf.append(".").append(component);
- } else {
- sbuf.append(componentPrefix).append(".").append(component);
- }
- sbuf.append("\t");
-
- sbuf.append(levelName).append("\t");
-
- sbuf.append(escape(formattedMessage));
- if (t != null) {
- formatException(t, sbuf);
- }
- sbuf.append("\n");
- return sbuf.toString();
- }
-
- /**
- * Format throwable into given StringBuffer.
- *
- * @param t The Throwable we want to format
- * @param sbuf The stringbuffer into which we wish to
- * format the Throwable
- */
- @Deprecated(since = "7", forRemoval = true) // Unused - this is not the format used by the Vespa log handler
- public static void formatException (Throwable t, StringBuilder sbuf) {
- Throwable last = t;
- int depth = 0;
- while (last != null) {
- sbuf.append("\\nmsg=\"");
- sbuf.append(escape(last.getMessage()));
- sbuf.append("\"\\nname=\"");
- sbuf.append(escape(last.getClass().getName()));
- sbuf.append("\"\\nstack=\"\\n");
-
- // loop through stack frames and format them
- StackTraceElement[] st = last.getStackTrace();
- int stopAt = Math.min(st.length, 15);
- boolean first = true;
- for (int i = 0; i < stopAt; i++) {
- if (first) {
- first = false;
- } else {
- sbuf.append("\\n");
- }
- sbuf.append(escape(st[i].toString()));
- }
-
- // tell the reader if we chopped off part of the stacktrace
- if (stopAt < st.length) {
- sbuf.append("\\n[...]");
- }
- sbuf.append("\\n\"");
-
- last = last.getCause();
- depth++;
- }
- sbuf.append(" nesting=").append(depth);
- }
-
static String formatThreadProcess(long processId, long threadId) {
if (threadId == 0) {
return Long.toString(processId);