edwardeguard-cosita | 2 Apr 05:10 2005
Picon

tomcat 5.5/win & loading external image files

i need to load a bunch of image files located outside my exploded war
file.  for example, say that the images live here 

|---c:\myimages
|-----------\app
|-----------------\promotions
|-------------------------\images

& my app is under 

|---c:\tomcat5.5
|----------\webapps
|--------------------\myapp.  

the img links are written out dynamically based on an init-param in the
web.xml & javabeans.   the result is that i can get a valid path to the
image resouce looking at the html, but cannot actually load the image. 

does anyone know if that's possible on the windows platform (win2k
server)?  

 
thanks
edwardeguard-cosita | 2 Apr 06:01 2005
Picon

stdout & log4j in tomcat 5.5

sorry about the eariler tomcat only post. my bad. 2 questions:

1) does the config file below look ok to you all in a general way, no
obvious errors, etc?

2) im trying to get my log4j output for my web app (win2k server &
tomcat 5.5) to only go to my log files.  its a standard setup: using
commons logging & log4j 1.2., the log4j.props is in my web-inf/classes.

 
problem is that it looks like some things (system.outprintln(),
org.apache.struts, etc ) are still also going to the stdout log files
(e.g stdout_20050401.log).  i see what i expect in my log files, but i *
didnt * want to see it in the stdout log.  is that a normal limitation
of log4j 1.2.9/tomcat 5.5 or did i miss something here.

# log4j.properties
#---------------------------------------------------------------
log4j.rootCategory=DEBUG, roll-error

#----------- my web
log4j.category.com.company-name=DEBUG, roll-debug
log4j.additivity.com.company-name=FALSE
#---------------------------------------------------------------
# Console Appender
#---------------------------------------------------------------
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.Threshold=INFO
log4j.appender.console.layout=org.apache.log4j.PatternLayout
# Pattern to output the caller's file name and line number.
(Continue reading)

Peter DeGregorio | 3 Apr 14:30 2005
Picon
Picon

log4j trace enabled version

Hello, 
Since those who control log4j have refused to add a trace level below debug with Logger methods
isTraceEnabled() and trace() is there a readily available modification to log4j 1.2.9 that has a trace
level built in? 
-- Peter
Jacob Kjome | 3 Apr 18:35 2005

Re: log4j trace enabled version


Please do your research before making such claims....

http://cvs.apache.org/viewcvs.cgi/logging-log4j/src/java/org/apache/log4j/Logger.java?rev=1.29&view=markup
http://cvs.apache.org/viewcvs.cgi/logging-log4j/src/java/org/apache/log4j/Category.java?rev=1.95&view=markup

Note that will be available for 1.3 release (and already exists in the 
alpha releases), but will never be added to an official release of the 
1.2.x series.  There is no plan for any further 1.2.x releases.

Jake

At 08:30 AM 4/3/2005 -0400, you wrote:
 >Hello,
 >Since those who control log4j have refused to add a trace level below debug
 >with Logger methods isTraceEnabled() and trace() is there a readily
 >available modification to log4j 1.2.9 that has a trace level built in?
 >-- Peter
Peter DeGregorio | 3 Apr 21:25 2005
Picon
Picon

Re: log4j trace enabled version

I did do my research, thank you very much. Plenty of it. This stuff you sent is buried somewhere in a CVS server
evidently. What research would reveal this? This is not an idle question, the links you sent me are not
complete ... a modification to Level is required also and I don't know how to find that. 
Andy McBride | 3 Apr 22:05 2005

RE: log4j trace enabled version

You don't need to look at CVS to find what you are looking for.

A search of the log4j-dev mailing list would have revealed many posts over
the past year which answered your question.  Perhaps you should look there
before making remarks regarding what the log4j committers have and have not
decided to do.

A vote was taken on adding the trace level and the functionality you desire
has already been added to the forthcoming log4j 1.3 release.  

Andy

> -----Original Message-----
> From: Peter DeGregorio [mailto:pdegregorio <at> comcast.net]
> Sent: 03 April 2005 20:26
> To: log4j-user <at> logging.apache.org
> Subject: Re: log4j trace enabled version
> 
> I did do my research, thank you very much. Plenty of it. This stuff you
> sent is buried somewhere in a CVS server evidently. What research would
> reveal this? This is not an idle question, the links you sent me are not
> complete ... a modification to Level is required also and I don't know how
> to find that.
Jim Rice | 3 Apr 22:09 2005
Picon

Re: log4j trace enabled version

Dear Colleagues,

Ceki Gulcu has written a very powerful Log4J manual which can be found
at https://www.qos.ch/shop/products/log4j/log4j-Manual.jsp.  Mr. Gulcu
discusses writing your own Level on pages 155 through 160.  A couple
of examples have been provided.

I have found this documentation to be extremely valuable and worth
much more than its very modest price. I have it a shortcut's length
for easy reference.

Please check out this manual.  I believe it will answer all of your questions.

Thanks,

Jim

On Apr 3, 2005 2:25 PM, Peter DeGregorio <pdegregorio <at> comcast.net> wrote:
> I did do my research, thank you very much. Plenty of it. This stuff you sent is buried somewhere in a CVS
server evidently. What research would reveal this? This is not an idle question, the links you sent me are
not complete ... a modification to Level is required also and I don't know how to find that.
>
Henrik Engert | 4 Apr 11:30 2005

Log4J stops logging

Hi,

We have a problem with our application that uses Log4j. All of a sudden
it stops logging INFO level and only keeps on logging DEBUG level. If I
restart the application it works fine for a while then it stops.

We are using Log4J version 1.2.8 and Java 1.4.

We initialize Log4J with a property file like this:

log4j.rootCategory=3DDEBUG, FILE

log4j.appender.FILE=3Dorg.apache.log4j.RollingFileAppender
log4j.appender.FILE.File=3D/bookit/prod/dataBI30/log/z3970.log
log4j.appender.FILE.MaxFileSize=3D30MB
log4j.appender.FILE.MaxBackupIndex=3D4
log4j.appender.FILE.layout=3Dorg.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern=3D%d %-4r [%t] %-5p %c %x -
%m%n

We are not resetting the log4J anywhere in the code or it's treshold.

Any ideas?

Regards,
Henrik Engert
###########################################

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.f-secure.com/
(Continue reading)

Peter DeGregorio | 4 Apr 13:27 2005
Picon
Picon

Re: log4j trace enabled version

Thank you developers for adding trace. But it isn't "readily available" from 
what I can tell so far, which my question specified. Regarding what 
developers have decided to do or not do, did it ever occur to you that the 
log4j users list would be a good place to reveal that trace is added even to 
the limited extent it has been? While I did not search the developer list I 
did scan 10,000 message subjects here and there is not a single word about 
trace being sort of available, until now that is.

Regarding the Ceki G. very good book, I had already purchased it and worked 
through the mentioned chapter on extending log4j however, it did not meet my 
requirements for a built-in trace level. So, I modified log4j myself, which 
fortunately was not hard to do. I initially had trouble compiling log4j 
unmodified and, actually, asked a question on the developer list about that 
which was ignored. I don't have a jms.jar and don't know how to get one 
easily so all of the classes don't get built. My modification seems to work 
fine but I am neither qualified nor inclined to become a log4j developer so 
I asked the question here about whether there is a readily available log4j 
modification with trace. I don't think that requiring people who want a jar 
with Logger.trace() and Logger.isTraceEnabled() built in to modify log4j 
themselves especially with hard-to-find jars necessary to get a full build 
qualifies as "readily available".

I am happy to share my modification with anyone who requests it, source 
code, prebuilt jar (jdk 1.4; it won't do java message service related stuff 
unless you build it yourself with jms.jar) and how-to-build instructions 
included but I'm sure this would be better if it came from a qaulified log4j 
developer.

Peter

(Continue reading)

Lutz Michael | 4 Apr 13:38 2005
Picon

RE: log4j trace enabled version


you shouldn't modify Log4j to add new levels.  It's not optimal in general
to modify Log4j because it will make it more difficult to upgrade as new
releases occur.

To add levels extend the Level class, and specify your class in your config
XML, for example:

	<!-- Example of a logger for a specific class that overrides the
root logger -->
	<logger name="com.org.WhateverClass">
		<level class="com.org.MyNewLogLevel" value="SOME_NEW_LEVEL"
/>
	</logger>

see http://logging.apache.org/log4j/docs/api/org/apache/log4j/Level.html

-----Original Message-----
From: Peter DeGregorio [mailto:pdegregorio <at> comcast.net]
Sent: Monday, April 04, 2005 7:28 AM
To: Log4J Users List
Subject: Re: log4j trace enabled version

Thank you developers for adding trace. But it isn't "readily available" from

what I can tell so far, which my question specified. Regarding what 
developers have decided to do or not do, did it ever occur to you that the 
log4j users list would be a good place to reveal that trace is added even to

the limited extent it has been? While I did not search the developer list I 
(Continue reading)


Gmane