Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -160,6 +160,31 @@ private void log(String message, LogType type, @Nullable ErrorType error, @Nulla
}
}

/**
* Logs a {@link LogEntry}.
* @param entry the log entry
*/
public void log(LogEntry entry) {
if (!open) {
return;
}

// Ignore debug entries if debug mode is disabled
if (entry.getType() == LogType.DEBUG && !debug) {
return;
}

if (entry.getType() == LogType.ERROR) {
if (!hasError) {
clearNotError();
logEntries.add(entry);
hasError = true;
}
} else {
logEntries.add(entry);
}
}

/**
* Logs an error message
* @param message the error message
Expand Down
Loading