Return-Path: Delivered-To: apmail-jakarta-log4j-dev-archive@apache.org Received: (qmail 11228 invoked from network); 8 May 2003 00:02:06 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 8 May 2003 00:02:06 -0000 Received: (qmail 27753 invoked by uid 97); 8 May 2003 00:04:14 -0000 Delivered-To: qmlist-jakarta-archive-log4j-dev@nagoya.betaversion.org Received: (qmail 27746 invoked from network); 8 May 2003 00:04:14 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 8 May 2003 00:04:14 -0000 Received: (qmail 11017 invoked by uid 500); 8 May 2003 00:02:03 -0000 Mailing-List: contact log4j-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@jakarta.apache.org Received: (qmail 11006 invoked by uid 500); 8 May 2003 00:02:03 -0000 Received: (qmail 11003 invoked from network); 8 May 2003 00:02:03 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 8 May 2003 00:02:03 -0000 Received: (qmail 59784 invoked by uid 1665); 8 May 2003 00:02:07 -0000 Date: 8 May 2003 00:02:07 -0000 Message-ID: <20030508000207.59783.qmail@icarus.apache.org> From: psmith@apache.org To: jakarta-log4j-sandbox-cvs@apache.org Subject: cvs commit: jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw ChainsawConstants.java LogUI.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N psmith 2003/05/07 17:02:07 Modified: src/java/org/apache/log4j/chainsaw ChainsawConstants.java LogUI.java Log: added ability to use the RemoteHost property if it is there for the tab pane, if it can't find anything else to use. Revision Changes Path 1.4 +1 -0 jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/ChainsawConstants.java Index: ChainsawConstants.java =================================================================== RCS file: /home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/ChainsawConstants.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ChainsawConstants.java 5 May 2003 00:59:05 -0000 1.3 +++ ChainsawConstants.java 8 May 2003 00:02:06 -0000 1.4 @@ -37,6 +37,7 @@ static final String NONE_COL_NAME = "None"; static final String LOG4J_APP_KEY = "log4japp"; static final String LOG4J_MACHINE_KEY = "log4jmachinename"; + static final String LOG4J_REMOTEHOST_KEY = "log4j.remoteSourceInfo"; static final String LOG4J_ID_KEY = "log4jid"; static final String UNKNOWN_TAB_NAME = "Unknown"; static final String GLOBAL_MATCH = "*"; 1.36 +20 -1 jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/LogUI.java Index: LogUI.java =================================================================== RCS file: /home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/LogUI.java,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- LogUI.java 7 May 2003 17:10:28 -0000 1.35 +++ LogUI.java 8 May 2003 00:02:07 -0000 1.36 @@ -266,7 +266,6 @@ System.exit(0); } }); - setVisible(true); } @@ -373,6 +372,26 @@ if (appname != null) { ident.append("-"); ident.append(appname); + } + + if( ident.length() == 0) { + /** + * Maybe there's a Remote Host entry? + */ + String remoteHostKey = ChainsawConstants.LOG4J_REMOTEHOST_KEY + "="; + String remoteHost = null; + int rhposition = properties.indexOf(remoteHostKey) + remoteHostKey.length(); + + if (rhposition >= remoteHostKey.length()) { + int rhlength = properties.indexOf(",", rhposition); + + if (rhlength == -1) { + rhlength = properties.length(); + } + + remoteHost = properties.substring(rhposition, rhlength); + } + ident.append(remoteHost); } if (ident.length() == 0) { --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: log4j-dev-help@jakarta.apache.org