Skip to content
Merged
Show file tree
Hide file tree
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 number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public Logger getLogger()
return _log;
}

protected void setLogLevel(Level logLevel)
public void setLogLevel(Level logLevel)
{
_logLevel = logLevel;
}
Expand Down
13 changes: 13 additions & 0 deletions jbrowse/src/org/labkey/jbrowse/JBrowseManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package org.labkey.jbrowse;

import org.apache.commons.lang3.SystemUtils;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -237,6 +238,8 @@ public void testJBrowseCli() throws Exception
{
File exe = JBrowseManager.get().getJbrowseCli();
SimpleScriptWrapper wrapper = new SimpleScriptWrapper(_log);
wrapper.setLogLevel(Level.INFO);
wrapper.setLogPath(true);
wrapper.setThrowNonZeroExits(false);

String output = wrapper.executeWithOutput(Arrays.asList(exe.getPath(), "help"));
Expand All @@ -247,6 +250,16 @@ public void testJBrowseCli() throws Exception
_log.error("output: ");
_log.error(output);

// Repeat without output going direct to the server log:
try
{
wrapper.execute(Arrays.asList(exe.getPath(), "help"));
}
catch (Exception e)
{
// Ignore
}

throw new RuntimeException("Non-zero exit running testJBrowseCli: " + wrapper.getLastReturnCode());
}

Expand Down