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