Skip to content

Commit

Permalink
add gui appender
Browse files Browse the repository at this point in the history
  • Loading branch information
Siedlerchr committed Dec 12, 2021
1 parent d86bcfe commit efd75a0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/main/java/org/jabref/gui/logging/GuiAppender.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

import java.util.Locale;

import org.tinylog.Level;
import org.tinylog.format.AdvancedMessageFormatter;
import org.tinylog.format.MessageFormatter;
import org.tinylog.provider.ContextProvider;
import org.tinylog.provider.LoggingProvider;
import org.tinylog.provider.NopContextProvider;
import org.jabref.gui.util.DefaultTaskExecutor;
import org.jabref.logic.logging.LogMessages;

import org.slf4j.event.DefaultLoggingEvent;
import org.slf4j.event.LoggingEvent;

public class GuiAppender implements LoggingProvider {

Expand Down Expand Up @@ -45,9 +44,12 @@ private void log(Throwable exception, String message, Object[] arguments) {
if (builder.length() > 0) {
builder.append(": ");
}
builder.append(exception);
}


System.out.println(builder);

// DefaultTaskExecutor.runInJavaFXThread(() -> LogMessages.getInstance().add(copy));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.jabref.gui.logging.GuiAppender

0 comments on commit efd75a0

Please sign in to comment.