logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luis Reis <Luis.R...@netcabo.pt>
Subject RE: Packaging Chainsaw & LF5 as executable jars
Date Wed, 05 Feb 2003 09:04:11 GMT
Hi,

I've already tested it, looks great!

Didn't know that LF5 could be run just like that:)

I've made several tests with JDK 1.3 (no XML parser) and the conclusions
where:

1) If no XML parser is found, chainsaw shows a nasty error message but
runs anyway, although being unable to read xml log files. LF5 doesn't
even run without a XML parser.

2) The -jar option to java makes it ignore any other classpath
definitions, so, the only way to put it back in is to have it on JRE's
standard extension directory.

   2.1) This was done by executing (as root):

	$ cd /usr/java/jdk1.3.1/jre/lib/ext/
	$ ln -s /usr/local/xerces-2_0_2/xmlParserAPIs.jar .
	$ ln -s /usr/local/xerces-2_0_2/xercesImpl.jar .

	Of course, this files/locations are installation dependent, and
 	I usually place everything under /usr/local (on either win32 or
	linux :), but, I don't think that's a/the standard location.
	The placement for jdk1.3.1 in this case is mandated by sun's
	rpm.

3) The other approach is to bundle a XML parser, where, giving this
project nature, xerces seems (to me) to be the "natural" choice. If that
was the choice taken, it would only be necessary to include it's jars in
both "runnable" jar manifest files Class-Path attributes.

---

A bit off-topic, while testing this, I've stumbled on a LF5 patch that
I've proposed before that is JDK 1.4 dependent. Can anybody help me on
solving that issue ? It seems to me that either build.xml should detect
JDK's version and compile different files (which is the easiest
implementation but the nastiest for distribution) or that the code
should detect the lack of the new API's and silently fail to the older
ones.

I have also some ideas on using jdk 1.4 NIO API's on Log4J and solving
this issue would help a lot.

--
Luis

On Wed, 2003-02-05 at 03:58, mwomack@apache.org wrote:
    Done.  Thanks, Luis!
    
    I also added a target to build an executable jar for LF5.  What if the user needs to include
an xml parser in the classpath for these jars?
    
    -Mark
      -----Original Message-----
      From: Luis Reis [mailto:Luis.Reis@netcabo.pt]
      Sent: Tuesday, February 04, 2003 5:22 PM
      To: Log4J Developers List
      Subject: RE: Packaging Chainsaw & LF5 as executable jars
    
    
      Mark and Ceki, 
    
      I found that there's no need for a manifest file after all... 
    
      Here's a "diff -u" to the current build.xml that generates a "runnable" log4j-chainsaw-<version>.jar
file. 
    
      I didn't need to make any other changes. 
    
      I don't have write access to CVS, so, please, check the code and then check it in (CVS)
:). 
    
      -- 
      Luis 
    
      On Wed, 2003-02-05 at 00:50, Mark Womack wrote: 
    Luis, sorry!  I did not look at the enclosures!  This is great.
    
    Do you have write access to the cvs tree?  If not, I'll figure out where to
    check it in and add an ant task tonight. I need to be at home to figure out
    where a good place is to put it.
    
    -Mark
    
    > -----Original Message-----
    > From: Luis Reis [mailto:Luis.Reis@netcabo.pt]
    > Sent: Tuesday, February 04, 2003 4:42 PM
    > To: Log4J Developers List
    > Subject: RE: Packaging Chainsaw & LF5 as executable jars
    > 
    > 
    > Mark,
    > 
    > I did test everything I've sent in the previous e-mail.
    > 
    > Please, I'm a rookie to log4j's cvs tree, can you tell me where's the
    > proper place to put that chainsaw.mf file ?
    > 
    > Leave the rest to me, I can take it from there.
    > 
    > --
    > Luis
    > 
    > On Wed, 2003-02-05 at 00:10, Mark Womack wrote:
    > 
    >     Hi Luis,
    >     
    >     We use ant to build all of the released stuff, so it does 
    > need to be done in
    >     ant.  But it sounds like all we really need is a manifest 
    > file that has the
    >     right contents.  I can spend the time to figure this out, 
    > but if an
    >     interested person out there (Niclas, Luis?) could create 
    > and test one, it
    >     will happen quicker. :-)  Once we have the manifest file, 
    > it is easy to
    >     create an ant task that uses it when creating the jar.
    >     
    >     -Mark
    >     
    >     > -----Original Message-----
    >     > From: Luis Reis [mailto:Luis.Reis@netcabo.pt]
    >     > Sent: Tuesday, February 04, 2003 4:03 PM
    >     > To: Log4J Developers List
    >     > Subject: RE: Packaging Chainsaw & LF5 as executable jars
    >     > 
    >     > 
    >     > There's no need to have a ant task for that, you just 
    > need to add a
    >     > "Main-Class" attribute to the log4j-1.2.x.jar file's manifest 
    >     > indicating
    >     > either ChainSaw or LogFactor5 (though I think 
    > LogFactor5 may need some
    >     > more salt than that).
    >     > 
    >     > You can generate a "runnable" chainsaw.jar by using the included
    >     > manifest file on the current cvs tree with this command line:
    >     > 
    >     >     $ jar cvfm chainsaw.jar chainsaw.mf
    >     > 
    >     > This will create a jar file containing only the manifest. If 
    >     > it's placed
    >     > on the same directory as log4j-1.3alpha.jar it will be 
    > runnable with:
    >     > 
    >     >     $ java -jar chainsaw.jar
    >     > 
    >     > If you need any more info/work than this, please say so.
    >     > 
    >     > AFAIK, LogFactor5 is an Appender and packaging it on a 
    > jar file will
    >     > require further work.
    >     > 
    >     > ---
    >     > Luis
    >     > 
    >     > 
    >     > On Tue, 2003-02-04 at 07:45, mwomack@apache.org wrote:
    >     >     If someone wants to post an ant task that will do this, I 
    >     > will integrate
    >     >     into the core build script.
    >     >     
    >     >     -Mark
    >     >     
    >     >     > -----Original Message-----
    >     >     > From: Niclas Hedhman [mailto:niclas@ewarna.com]
    >     >     > Sent: Thursday, December 12, 2002 9:31 PM
    >     >     > To: Log4J Developers List
    >     >     > Subject: Re: Log4J Log Viewer GUI (a la LogFactor5)
    >     >     >
    >     >     >
    >     >     > On Friday 13 December 2002 13:19, Mark Womack wrote:
    >     >     > > > java -jar log4j-lf5.jar
    >     >     > > >
    >     >     > > > (or the 'double-click' if configured correctly in OS)
    >     >     > > > would lower the threshold a lot...
    >     >     > >
    >     >     > > Executable jars.  Cool.  But don't they still need 
    >     > log4j in the
    >     >     > classpath?
    >     >     > > Or can one define the classpath in jar manifest as well?
    >     >     >
    >     >     > Class-Path: log4j-base.jar log4j-utils.jar
    >     >     >
    >     >     > and so on, is placed in the manifest header. Location 
    >     > relative to
    >     >     > the Jar file
    >     >     > in which the manifest resides.
    >     >     >
    >     >     > Amazing that JDK1.1 features has not penetrated the Java
    >     >     > community better.
    >     >     > Tons of fairly hard to configure/install 
    > applications could have
    >     >     > been done in
    >     >     > executable jar files.
    >     >     >
    >     >     > Niclas
    >     >     >
    >     >     > --
    >     >     > To unsubscribe, e-mail:
    >     >     > <mailto:log4j-dev-unsubscribe@jakarta.apache.org>
    >     >     > For additional commands, e-mail:
    >     >     > <mailto:log4j-dev-help@jakarta.apache.org>
    >     >     >
    >     >     
    >     >     
    >     >     
    >     > 
    > ---------------------------------------------------------------------
    >     >     To unsubscribe, e-mail: 
    > log4j-dev-unsubscribe@jakarta.apache.org
    >     >     For additional commands, e-mail: 
    > log4j-dev-help@jakarta.apache.org
    >     >     
    >     >     
    >     >     
    >     > 
    >     
    >     
    > ---------------------------------------------------------------------
    >     To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
    >     For additional commands, e-mail: log4j-dev-help@jakarta.apache.org
    >     
    >     
    > 
    
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: log4j-dev-help@jakarta.apache.org
    
    
    
    
    


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org


Mime
View raw message