public static SerializableLogEntry fromLogEntry(Severity severity, LogEntry logEntry) {
    SerializableLogEntry serializableLogEntry = new SerializableLogEntry();

    serializableLogEntry.severity = severity;
    serializableLogEntry.message = logEntry.getMessage();
    serializableLogEntry.sourceClass =
        RGS + (logEntry.getSourceClass() == null ? "" : ":" + logEntry.getSourceClass());
    serializableLogEntry.throwable = logEntry.getThrowable();
    serializableLogEntry.hintObject = convertHintObject(logEntry.getHintObject());
    serializableLogEntry.scopeIds = logEntry.getScopeIds();
    serializableLogEntry.nodeId = logEntry.getNodeId();
    serializableLogEntry.timestamp = logEntry.getTimestamp();
    serializableLogEntry.marker = logEntry.getMarker();

    return serializableLogEntry;
  }
Beispiel #2
0
 public void fatal(LogEntry e) {
   myErrors.add(e.getMessage());
 }
Beispiel #3
0
 public void error(LogEntry e) {
   myErrors.add(e.getMessage());
   if (e.getThrowable() != null) {
     myErrors.add(extractStackTrace(e.getThrowable()).toString());
   }
 }
Beispiel #4
0
 public void warning(LogEntry e) {
   myWarnings.add(e.getMessage());
 }
 public LogEntry toLogEntry() {
   LogEntry logEntry =
       new LogEntry(sourceClass, message, throwable, hintObject, scopeIds, nodeId, timestamp);
   logEntry.setMarker(marker);
   return logEntry;
 }