Howdy,
Make sure your initial context factory implementation is in WEB-INF/lib,
and that you construct an initial context with the environment parameter
(hashtable), not just new InitialContext(). In that environment,
specify the factory class name and server JNDI URL. When you don't,
you're
setting in
config
file will avoid writing fatal messages too..
Sudhakar
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 7:31 PM
To: Log4J Users List
Subject: RE: Selective Logging
Howdy,
1)I want to log only error level messages
the IBM jars in my Web-inf/lib directory.
Sabitha
Shapira, Yoav [EMAIL PROTECTED] wrote:
Howdy,
Make sure your initial context factory implementation is in
WEB-INF/lib,
and that you construct an initial context with the environment
parameter
(hashtable), not just new InitialContext
, December 18, 2003 11:17 AM
To: Log4J Users List
Subject: RE: JMSQueueAppender and Tomcat 4.1
Yes.. this class is in the websphere.jar file and I have included it -
along with log4j-1.2.8.jar - in my WEB-INF/lib directory.
Sabitha
Shapira, Yoav [EMAIL PROTECTED] wrote:
Howdy,
And the class
Howdy,
You need to specify the absolute path or use an environment variable,
such as one set to the server's home. Your current specification is
relative to the current working directory of the server, which varies
depending on how the server is invoked.
Yoav Shapira
Millennium ChemInformatics
.
Yoav Shapira
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 10:44 AM
To: Log4J Users List
Subject: RE: Log output path problem
Howdy,
You need to specify the absolute path or use an environment variable,
such as one set
Howdy,
You do know the SMTP appender by default will only send our ERROR and
higher messages, right?
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Jardin Xavier [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 10:06 AM
To: Log4J Users List
Subject: Re:
have to
send
an error message to collect and send all the message previously log on
it
with a low level priority ?
Xavier.
- Original Message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Log4J Users List [EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 4:07 PM
Subject: RE: Log4j SMTP
:25
41)
at
org.apache.catalina.loader.WebappLoader$WebappContextNotifier.run(Webap
pLoa
d
er.java:1369)
at java.lang.Thread.run(Thread.java:534)
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 25, 2003 9:53 AM
To: Log4J Developers List
Howdy,
There is anyway to improve the performance in a concurrency environment
(maybe defining a buffer size and have only one thread writing to the
file
and to the console? ) and prevent this concurrency problems?
If, instead of having the logger for each class as a static variable,
if i
have a
for the reply.
What are the implications of using an AsyncAppender? With AsyncAppender
don't i have an high probability of get a confused log with lines
cutted at
half by other lines that are being added?
Rui Campos
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent
Howdy
Firstly, log4j already has a FAQ, and moreover it's wiki so you can put your money
where your mouth is.
Secondly, I don't think this is technically a FAQ as it's asked very rarely (about
once in six months I think).
Yoav Shapira
Millennium ChemInformatics
-Original Message-
Howdy,
You need to access the SMTPAppender object and call its methods to
dynamically change the properties like the subject line.
How are you configuring log4j? If you know the name of the
SMTPAppender, e.g. EmailAppender this is pretty easy. In your class,
you would do something like:
: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 18, 2003 8:50 AM
To: Log4J Users List
Subject: RE: SMTP log4j question
Howdy,
You need to access the SMTPAppender object and call its methods to
dynamically change the properties like the subject line.
How are you configuring log4j
Howdy,
By doing jar cvf [jarFileName] log2j.properties ;) It's not difficult.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Sahraei Sasan-ssahra01 [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2003 10:04 AM
To: 'Log4J Users List'
Subject: log4j.properties in
was, is it possible though to include the
properties file into a jar file, will be accessble then by log4j
loaders
(those classes that are required to read it)?
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: 17 November 2003 15:14
To: Log4J Users List
Subject: RE
Howdy,
I guess you're assuming log4j automatically reads environment properties
into an env. prefix scheme like Ant? ;) Try just environment variable,
e.g. $CATALINA_HOME or ${CATALINA_HOME}.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Praveen Alavilli
Howdy,
Can you rerun your system with -Dlog4j.debug=true as a java runtime option, and tell
us what you're logging in the logger.error(???) statement?
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Magnus Andersson [mailto:[EMAIL PROTECTED]
Sent: Thursday, November
Howdy,
A decent place to stop and start such threads in a servlet container
would be the ServletContextListener.
There is no static destructor, but you have Runtime#addShutdownHook
which is suitable for this purpose as well. Create a little Runnable
class with a reference to the Watchdog
Howdy,
Look at the cyclic buffer used by the SMTP appender. It does what you
want. You can modify another appender to use it as well.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Alan Brown [mailto:[EMAIL PROTECTED]
Sent: Monday, November 10, 2003 2:35 PM
To:
Howdy,
I'm using Resin Servlet Container. I have developed librairies(jar
files)
that are shared by many web applications, I have put my libraries jar
in
the
global classpath of the servlet container.
You problem pretty much starts and ends here. Disk space is cheap: have
each app's jars in
Howdy,
Neither in the JSPs nor the servlet: take Jacob's advice about the
ServletContextListener, it's a good one.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Laurent Blume [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 12:36 PM
To: Log4J Users List
Howdy,
True. But this is trivial, is in many of the free examples, and in the
archives of this list.
log4j.appender.f1=org.apache.log4j.FileAppender
log4j.appender.f1.File=file1.txt
log4j.appender.f1.Layout=org.apache.log4j.TTCCLayout
log4j.appender.f1.additivity=false
Howdy,
I don't have a solution to your problem, just a couple of
points/questions. ;)
The log4j1.2.8.jar file is in each webapp/WEB-INF/lib.
Each webapp has its own config file in webapp/WEB-INF/classes.
Good.
Each config file contains:
log4j.rootLogger=DEBUG
log4j.logger.dev=DEBUG, dev
Howdy,
This is true -- in fact it grew out of a classloader discovery type mechanism into
more of a wrapper ;)
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Ceki Gülcü [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 8:42 AM
To: Log4J Users List
Subject: RE:
Howdy,
http://www.qos.ch/logging/thinkAgain.html
http://nagoya.apache.org/wiki/apachewiki.cgi?Log4JProjectPages/Log4jvsJDKLogging
http://builder.com.com/5100-22-1046694.html
Log4j will be around. The next major release, v1.3, is going to have several great
new features to further distance
Howdy,
http://nagoya.apache.org/wiki/apachewiki.cgi?Log4JProjectPages/Log4jvs
JDKL
ogging
I modified and edited the above page. Please let me know what you
think.
I took a look -- I like it ;) I corrected a couple of small text
errors. I would like to add a link to the phrase that says log4j
Howdy,
Not a log4j issue: this is controlled by the umask setting for the user
running the JVM.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Scott Burns [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 23, 2003 9:10 AM
To: [EMAIL PROTECTED]
Subject: log file
accounts that way.
So, unless the program or script explicitly sets a umask without group
write, all files created would have group write permissions.
That's why I asked about log4j.
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 23, 2003 9:12 AM
Howdy,
Did you mean this thread?
http://marc.theaimsgroup.com/?l=log4j-userm=105189448809301w=2
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Dennis Cook [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 19, 2003 4:05 PM
To: [EMAIL PROTECTED]
Subject: Log level
Howdy,
I'm wondering whether there are any useful object renderers that I
haven't
heard about, hopefully downloadable and easily integratable. Things I'd
be
looking to output without having to have long debugging logic in my
code
would be beans, JDBC ResultSet rows, and so on. Looking around the
Howdy,
I've written initial versions of both (ResultSetRenderer and BeanRenderer). I've
submitted them to Bugzilla as enhancement request, because my WinCVS is not working
here at work. I'll commit them into the sandbox (unless someone wants them
elsewhere), hopefully tonight. Feel free to
where the log4j log file is, reads it and displays it,
on
request. Should not be too hard, and will be more
app-server-independent
and administrator-independent than any attempt to write the log file
directly to the web-root.
Daniel
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL
Howdy,
I am pretty sure that Tomcat and Jboss will run independantly in
separate
VM
instances, and hence definately separate class loaders. This implies
there
will be two indepedant instances of Log4j running, and they will need
to
log
to separate files.
I'm not sure at all -- can you convince
Howdy,
I'm assuming all I need to do is send mail to dev mailing list with the
subject PATCH, or [PATCH], and then include in the message the three
diff -
c
outputs?
You could do that or open a Bugzilla enhancement and attach your diffs.
Is this kind of functionality useful to others?
Not to
Howdy,
Conversion words are in log4j 1.3, which has not yet been released. Although an Alpha
is not far away...
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Lethin, Doug [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 16, 2003 11:58 AM
To: Log4J Users List
Howdy,
Even if deploy exploded (a feature servlet containers are not required
to support), the server admin may configure the server such that you
don't have write access under your webapp. The only directory you're
guaranteed write access to by the servlet specification is
Hola,
I have read a number of posts referring to version 1.3 and/or the
log4-sandbox at Jakarta. I am eagerly awaiting the ConfigurationServlet
and
other new features, therefore the following questions:
- Is there a schedule for when 1.3 is to be launched? (or am I being
very
optimistic,
Howdy,
Not quite. Using isEnabledFor(Level l), e.g. isDebugEnabled() around
logger.debug statements can significantly reduce logging overhead. You
should read the log4j manual on this issue, as it contains a more
complete explanation and benchmarks.
As for your level of abstraction, which on
Howdy,
Yes.
Search the archives.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 3:00 PM
To: [EMAIL PROTECTED]
Subject: org.apache.log4j.DailyRollingFileAppender
My java application running on
Howdy,
Yes. The name is a unique identifier for a logger instance (within a
loger repository).
Logger.getLogger(com);
Logger.getLogger(com.foo);
Logger.getLogger(com.bar);
All return different Logger instances.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Lummis,
Howdy,
Chiming it late from the gallery -- you can take your log and try it in the HTML
Validator (http://validator.w3.org/). Although that requires a DOCTYPE so you may
have to add one manually to your HTML log file before validating.
Yoav Shapira
Millennium ChemInformatics
-Original
Howdy,
I spent most of the day, going over the documentation on log4j and
various
ways of logging under Tomcat. Great article on commons-logging vs.
Log4j :)
I saw a reference to how different web-applications can have different
log4j
configurations in think again, but I am not sure where that
Howdy,
If you used a classpath-discovery-based mechanism for configuring log4j,
you can do this:
http://javaalmanac.com/egs/java.lang/ClassOrigin.html?l=rel to figure
out if it came from a jar and if so which jar. But that's a partial
solution at best ;(
Yoav Shapira
Millennium ChemInformatics
Howdy,
I hate to be such a nitpick on this, and it's a matter of style only not substance,
but in case you care, things that are static final should be capitalized, so if you
have a private static final Logger it should be
private static final Logger LOGGER = Logger.getLogger(some.name);
If
Howdy,
Use different repositories? See the javadoc for
org.apache.log4j.LoggerRepository, org.apache.log4j.LogManager,
org.apache.log4j.RepositorySelector. There are sample
RepositorySelector implementations in the log4j sandbox CVS as well.
Yoav Shapira
Millennium ChemInformatics
Howdy,
Here's a pointer: http://marc.theaimsgroup.com/?l=log4j-userr=1w=2
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 25, 2003 11:07 AM
To: Log4J Users List
Subject: DailyRollingFileAppender with
Howdy,
When I put my log4j -1.2.8 in the jak*/common/lib directory, Tomcat
refuses
to start
Not the right place. Put it in the WEB-INF/lib directory of your
webapp.
Yoav Shapira
This e-mail, including any attachments, is a confidential business communication, and
may contain information
Howdy,
Search the list archives...
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Jain, Siddharth (ODC - Satyam) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 24, 2003 9:35 AM
To: [EMAIL PROTECTED]
Subject: Configuring SMTPAppender in log4j.properties
Hi,
I
Howdy,
I thought it was included in the log4j download itself??
You may wish to use Chainsaw instead of LogFactor5, as the former is
being actively developed and has a bunch of awesome new features planned
as part of the log4j 1.3 release.
Yoav Shapira
Millennium ChemInformatics
-Original
Howdy,
Why?
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Jensen, Jeff [mailto:[EMAIL PROTECTED]
Sent: Monday, September 22, 2003 10:45 AM
To: Log4J Users List
Subject: RE: Plans for supporting a build in level of trace
I also have wanted a TRACE level supported in
Howdy,
TRACE or FINE is one that many seem to agree is sensible and
required.
That's the part I'm not convinced of. How do you support the above?
I think the idea is, no matter how many or few default levels there
are,
the defaults should cover the range of the logging space completely.
FATAL
Howdy,
To separate concerns. Because trace info is a specific level, more
minutia
than debug info.
That's your use-case, not mine. Both are debug for me. I never want
one without the other. theValue=... is useless if I don't know what
method it's in.
Having TRACE in Log4j means:
1) No
Howdy,
I agree that this debate will carry on forever, because we all work
differently. I believe having one trace level is good compromise. The
way I work is to put debug statements into the code to decipher what is
happening in the program flow, but I would love to have a trace level
to
Howdy,
It does not really matter what TRACE level gets used for. Each
development
team / organization will have their interpretation of it depending on
how
they intend to use the information logged at both levels.
I agree, it doesn't matter what it's used for, only if it's used at all.
More
Howdy,
Try setting additivity=false for the email appender.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Dhruva B. Reddy [mailto:[EMAIL PROTECTED]
Sent: Friday, September 19, 2003 12:57 PM
To: [EMAIL PROTECTED]
Subject: Messages Going to Multiple Loggers
I am using
Howdy,
There's no overriding reason usually to move from
properties to XML files for log4j configuration. XML
configuration does do a couple of things properties can't,
although off the top of my head I can't remember what
those things are. OTOH, as always, XML is more verbose
than plaintext,
Howdy,
And please let me know if you run into any features you need not
supported by the sandbox Configuration servlet.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 6:55 AM
To: Log4J
Howdy,
I use log4j as you all know ;) To observe good performance practices, I
surround my logger.debug statements in if(logger.isDebugEnabled())
blocks. All works well.
I have many JUnit tests, and integrated unit test coverage reporting
with Clover (http://www.thecortex.net/clover/).
Let's
Howdy,
1 - Is there an upper file limit?
Only what's imposed by your filesystem. 2GB by default on many
filesystems I believe.
2 - As I understand it Log4j *will not* shut down our app if it
has a
problem.
You understand correctly.
3 - Is it bad practice to allow log files
Howdy,
I think that's a better practice because I don't like mixing
configuration files and classes. Other people do like this approach and
the auto-initialization you get with it.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: White, Joshua A (HTSC, CASD)
Howdy,
All the other classes contain this member init:
private static Logger log =
GenLogger.getLogger(GenLogConfiguratorBean.class);
Why would you want to have all your classes share the same Logger
instance? You wouldn't be able to change the debugging levels for
selected classes at runtime,
Howdy,
to my ae.jar file, even though I have explicitly told it not to. I am
sorry that I didn't unzip my jar files earlier, but I figured checking
JBuilders jar gui screen was enough.
So Chalk one up for open source! It was a JBuilder bug.
And chalk another bug to overcomplicated,
Howdy,
I don't think it makes a significant difference in performance if you
already have a system that's large enough to have tens of thousands of
classes running, which is the system size you'd have to have for the
number of Logger instances to matter even a tiny bit.
Note that you don't have
be ?
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Monday, September 15, 2003 6:20 PM
To: Log4J Users List
Subject: RE: No of Logger instances
Howdy,
I don't think it makes a significant difference in performance if you
already have a system that's large enough to have tens
Howdy,
It's not a stupid question, but (without knowing better) it seems like a
stupid requirement.
Since you're already using a custom appender, why not modify it to
touch i.e. create the log file in its activateOptions method? Better
yet, add a configurable option to create an empty file. It
Howdy,
Look in the log4j sandbox CVS, there are a couple of selectors (JNDI and
ServletContext, I believe).
http://cvs.apache.org/viewcvs/jakarta-log4j-sandbox/src/java/org/apache/
log4j/selector/
These may do the whole job for you, or at least serve as examples.
Yoav Shapira
Millennium
Howdy,
I personally am not a big fan of logging these types of objects: I much
prefer logging the beans I create from result sets (or DAO objects, or
whatever we call them this week). However, one possibility for you
would be to create a ResultSetRenderer (implements
Howdy,
It should work... I define class-specific logging levels in propery
files all the time. Of course, what you did was also make only the Sort
class append to the A2 appender. You may want to keep A2 associated
with the whole package, so do:
log4j.logger.org.apache.log4j.examples=WARN, A2
-Ursprüngliche Nachricht-
Von: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Gesendet am: Donnerstag, 4. September 2003 16:59
An: Log4J Users List
Betreff: RE: define different level for logging at file basis
Howdy,
It should work... I define class-specific logging levels in propery
files all the time
well for reasonably
simple/flat Objects, but does not have the smarts to generically
traverse into Collections/arrays. If interested I can post/email.
-don
At 08:47 AM 9/4/2003 -0400, Shapira, Yoav wrote:
Howdy,
I personally am not a big fan of logging these types of objects: I
much
prefer
Howdy,
You use it all the time if you do configureAndWatch() for log4j. It has
a concrete implementation as well, I think (PropertyWatchdog or
something like that). The name of the class pretty much explains it:
watch over a file and fire an event if the file changes. It's a common
pattern
Howdy,
try {
String a = null;
System.out.println(a.length());
} catch (Exception e) {
logger.error(Error printing string: , e);
}
Note the comma, i.e. the error(Object, Throwable) version of the API.
All the levels (logger.info(...), logger.warn(...), etc) have a version
of their signature
Howdy,
Look in the JBoss log for errors initializing log4j. Turn
-Dlog4j.debug=true to see log4j internal debugging output. Try
different paths for your File argument, e.g. d:\jboss\errors.log or
d://jboss/errors.log.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From:
Howdy,
I used log4j.debug=true in log4j.properties, but there is no internal
debugging output.
It's -Dlog4j.debug=true as a system property, as documented in the log4j
manual.
If I specify as follows:
log4j.appender.R.File=errors.log
It will get created in the server's working directory I
Howdy,
static Category cat = Category.getInstance(MyClass.class.getName());
In order to write logs to a file, should I modify the above line; and
if
yes, can you pl. tell me how I need to modify it?
I would suggest modifying it as
private static final Logger logger =
/
.
/appender
In the destination log4j.xml file, the value for the appender's file
param is C:\Java\tomcat/webapps/MYAPP/WEB_INF/myapp.log. Any
thoughts
???
--- regards ---
Larry
At 01:54 PM 8/5/03 -0400, Shapira, Yoav wrote:
Howdy,
This is a common problem, and you have several options.
The logging
Howdy,
Ant can handle either way, forward or back, as long as it's consistent.
The problem arises when a single string uses mixed slashes. Ant's
FixCRLF task works in this area and might be useful here.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Larry Young
Howdy,
How are you configuring log4j?
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Rishikesh Tembe [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 27, 2003 2:43 PM
To: Log4J Users List
Subject: duplicate logging?
Hi all,
If in my code I have
logger.info(AIN:
Howdy,
Cool, thanks for posting your final solution! ;)
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Larry Young [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 27, 2003 3:56 PM
To: Log4J Users List
Subject: RE: Location of log files
Yaov,
Agg
Howdy,
initialization servlet that goes through the log4j.properties file
making all the file locations be relative to my web app directory. The
code is listed below.
Consider putting this code in a ServletContextListener's
contextInitialized() method, instead of a servlet's init() method, as
Howdy,
This is not a log4j issue, it's a JDK problem. I use Windows 2000, have
GMT - 5 (US, Canada -- I'm in Boston) with the automatically adjust for
daylight savings time box checked, and have never had any problems...
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From:
Howdy,
Set log4j.defaultInitOverride=true. And RTFM, namely the Default
Initialization section of the Short Manual on the log4j website.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Sanjay Gupta (sanjaygu) [mailto:[EMAIL PROTECTED]
Sent: Monday, August 18, 2003
Howdy,
Assuming you log your exceptions with level error or higher, simply
define another FileAppender for the root logger whose threshold is
error.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Abramson, Rami [mailto:[EMAIL PROTECTED]
Sent: Monday, August 18, 2003
Howdy,
I also get a link broken message (and showing that Resin is the server,
and not tomcat?! ;) ;)), which is strange as I've downloaded them in the
past I think.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Najib Coutya [mailto:[EMAIL PROTECTED]
Sent: Monday,
Howdy,
Logger rootLogger = Logger.getRootLogger();
AppenderSkeleton a1 = (AppendeSkeleton) rootLogget.getAppender(A1);
a1.setThreshold(Level.INFO);
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, August 15, 2003
Howdy,
Each app should have its own copy of the common jar. Don't place one
copy of the commons jar in a common classloader repository, e.g.
tomcat's $CATALINA_HOME/common/lib.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Bill Comer [mailto:[EMAIL PROTECTED]
Sent:
Howdy,
I also meant the inverse of my solution, which is the apps should have separate
log4j.jar files. Each one should have its own copy of log4j in its WEB-INF/lib
directory.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Bill Comer [mailto:[EMAIL PROTECTED]
Howdy,
Also, it is programmatically possible to check if Log4j has been
configured
previously, thus avoiding the problem (which may or may not help in
this
particular case). My development team creates components used
throughout
our enterprise, and if an application has configured Log4j, we
Howdy,
Even though I'm sure many have seen it, I wanted to send a link to this
interesting article:
http://www-106.ibm.com/developerworks/java/library/j-instlog/
The article has an overview of log4j and details on how to implement a
remote instant messages (IM) appender.
Yoav Shapira
Millennium
Howdy,
Yes. Instead of them sharing log4j.jar, put a copy of the jar in each
app's WEB-INF/lib folder. Then keep the separate config files as you've
done, in each app's WEB-INF/classes folder. Make sure there's no
log4j.jar in tomcat's common/lib directory.
Yoav Shapira
Millennium
Howdy,
I'm a fan of the Level system and its relationship, so no I'm not
interested in your suggested mods, but I wanted to throw out an idea or
two for you that might reduce the need for coding:
- Can you use separate logger repositories as your types ?
- Can you use a Filter attached to the
that are calling them?
If this is a problem, then is there a way around it?
It seems like I want some type of logging context that I can
establish
on
a thread that defines ALL of the log settings, not just a name.
Pat
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Friday
Howdy,
U, so basically then it is not possible to define a directory path
in
the log4j.xml properties file so that log files are placed relative to
the
web apps root directory? Or for that matter relative to any known
anchor
point like the server root directory?
A problem we have is that
will be glad to be convinced otherwise by a benchmark, however...
Yoav Shapira
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Monday, August 11, 2003 3:29 PM
To: Log4J Users List
Subject: RE: log4j: dump wrap-around buffer of all log messages
Howdy,
I would
Howdy,
Thanks, thats a help but because of the setup of our application, I
cant
use the first two options, and I'd rather not define another properties
file just to store ${CATALINA_HOME}/logs/logs.txt. Is there any way I
can
do it programatically? What are the other options?
No. It would be
, August 11, 2003 9:13 AM
To: 'Log4J Users List'
Subject: RE: Creating log files relative to the web applications root
directory?
or Queen! lol ;)
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: 11 August 2003 14:05
To: Log4J Users List; [EMAIL PROTECTED]
Subject: RE
Howdy,
What should happen if the configureAndWatch() function is called twice?
Are the previous settings erased? Are they accumulated ?
It wouldn't be that hard to simply test this and see what happens ;)
But looking at the code, you see:
- configureAndWatch always creates a new XMLWatchdog,
Howdy,
I would really want this sort of feature benchmarked for memory use ;) Perhaps this
is one of the reasons log4j has better performance than your current java trace kit ;)
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Ceki Gülcü [mailto:[EMAIL PROTECTED]
Howdy,
this may be more a tomcat question so appologies if it is off-topic.
I want to plcae the log file under %TOMCAT_HOME%\logs (where all the
tomcat logs go).
Reading the archives of this list or the tomcat-user list would've
revealed answers, as this is a fairly common question.
I have
1 - 100 of 262 matches
Mail list logo