Commit 75987371 authored by Matija Obreza's avatar Matija Obreza
Browse files

Adjustable logging level during push

parent 7ce313b0
......@@ -12,6 +12,7 @@ import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
......@@ -121,7 +122,7 @@ public class PushDialog extends Dialog {
executorService.shutdown();
executorService.shutdownNow();
event.doit = executorService.getActiveCount() == 0;
_log.warn("Jobs are still running, refusing to close.");
_log.warn((executorService.getActiveCount()) + " jobs are still running, refusing to close.");
}
});
shell.setSize(691, 383);
......@@ -150,6 +151,34 @@ public class PushDialog extends Dialog {
tltmPushToGenesys.setText("Upload");
tltmPushToGenesys.setImage(AppWindow.pushDataIcon);
ToolItem tltmRadioItemDebug = new ToolItem(toolBar, SWT.RADIO);
tltmRadioItemDebug.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
logAppender.setThreshold(Level.DEBUG);
}
});
tltmRadioItemDebug.setSelection(true);
tltmRadioItemDebug.setText("DEBUG");
ToolItem tltmRadioItemInfo = new ToolItem(toolBar, SWT.RADIO);
tltmRadioItemInfo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
logAppender.setThreshold(Level.INFO);
}
});
tltmRadioItemInfo.setText("INFO");
ToolItem tltmRadioItemWarning = new ToolItem(toolBar, SWT.RADIO);
tltmRadioItemWarning.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
logAppender.setThreshold(Level.WARN);
}
});
tltmRadioItemWarning.setText("WARNING");
txtJson = new Text(shell, SWT.BORDER | SWT.READ_ONLY | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL | SWT.MULTI);
txtJson.setLayoutData(BorderLayout.CENTER);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment