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; }
public void error(LogEntry e) { myErrors.add(e.getMessage()); if (e.getThrowable() != null) { myErrors.add(extractStackTrace(e.getThrowable()).toString()); } }