*/
public static String getVersionDetailsForConsole()
{
- boolean extra = Console.isDebugEnabled()
+ return getVersionDetailsForConsole(false);
+ }
+
+ public static String getVersionDetailsForConsole(boolean forceExtra)
+ {
+ boolean extra = forceExtra || Console.isDebugEnabled()
|| !"release".equals(ChannelProperties.getProperty("channel"));
StringBuilder sb = new StringBuilder();
sb.append(ChannelProperties.getProperty("app_name"))
if (customProxySet &&
// we have a username but no password for the scheme being
// requested
- (protocol.equalsIgnoreCase("http")
- && (httpUser != null && httpUser.length() > 0
- && (httpPassword == null
- || httpPassword.length == 0)))
+ (protocol.equalsIgnoreCase("http")
+ && (httpUser != null
+ && httpUser.length() > 0
+ && (httpPassword == null
+ || httpPassword.length == 0)))
|| (protocol.equalsIgnoreCase("https")
&& (httpsUser != null
&& httpsUser.length() > 0
import javax.swing.border.Border;
import javax.swing.text.DefaultCaret;
+import jalview.bin.Cache;
import jalview.log.JLoggerI.LogLevel;
import jalview.log.JLoggerLog4j;
import jalview.log.JalviewAppender;
@Override
public synchronized void actionPerformed(ActionEvent evt)
{
+ if (getSelectedLogLevel() == LogLevel.DEBUG)
+ {
+ setHeader(Cache.getVersionDetailsForConsole(true));
+ }
trimBuffer(true);
// textArea.setText("");
}
// Append formatted message to textarea using the Swing Thread.
SwingUtilities.invokeLater(new Runnable()
{
+ @Override
public void run()
{
textArea.append(replace.toString());
// post a trim on Swing Thread.
SwingUtilities.invokeLater(new Runnable()
{
+ @Override
public void run()
{
trimBuffer(false);
{
return header;
}
+
+ public LogLevel getSelectedLogLevel()
+ {
+ return logLevelCombo == null ? null
+ : (LogLevel) logLevelCombo.getSelectedItem();
+ }
}