Hi,
Re-calling Configurator.configure() each time to make a change is
inefficient. Instead, either:
- Configure with a watchdog, i.e. configureAndWatch().
- Have a servlet, JSP, or whatever fits your framework, where the user
can input a logger name (package or class name, doesn't matter), and a
Hi,
Does anyone know a way to fix this??
Don't use a wrapper ;) Chances you're just reducing performance and
adding a layer or complexity for not much of a win.
Yoav Shapira
Millennium ChemInformatics
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
Hi,
Perhaps you could configure log4j to use different / additional
appenders to help your task. The console is annoying.
A file appender would write to a file, and you could then stream the
contents of the file over RMI in whatever chunks fits your system.
A socket appender could write
Howdy,
The email happens automatically ;) What is the point of SMTPAppender
otherwise? It hides all the javax.mail details from you.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Adams, Dick W [PCS] [mailto:DAdams07;sprintspectrum.com]
Sent: Friday, November 08,
Hi,
Do you get any error messages anywhere? Do you see the messages you're
trying to email on other appenders, e.g. a file somewhere?
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: louis [mailto:louis;allsofts.com]
Sent: Friday, November 08, 2002 12:46 PM
To: Log4J
Hi,
No for logging. You have to use
java.util.logging.LogManager.readConfiguration() or
readConfiguration(InputStream ins) yourself when you want the
configuration re-read. If you want automatic re-reading you have to
create and start a Thread subclass yourself.
FileWatchdog is not part of the
Hi,
You're specifying the path to a file. Use the File.separator for your
system. On Unix, that / normally, and on windows \.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Bradley M. Handy [mailto:bhandy;arbor.edu]
Sent: Friday, November 01, 2002 1:36 PM
To:
Hi,
Could it be that weblogic somewhere has another log4j jar whose version
conflicts with yours? Check all the directories from which weblogic
might load classes for versions of log4j. Don't forget various server
and JDK endorsed directories.
Yoav Shapira
Millennium ChemInformatics
the *order* in which
classes are loaded, but not the source of the class (.jar file/etc.).
-Mitch
-Original Message-
From: Shapira, Yoav [mailto:Yoav.Shapira;mpi.com]
Sent: Wednesday, October 30, 2002 8:35 AM
To: Log4J Users List
Subject: RE: JRun4, WebLogic 7.0 Log4J bufferedIO exception
Hi
Hi,
Why don't you have different appenders for each application, e.g. a
FileAppender, where the log file's name corresponds to the application
name?
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Follender, Ivan [mailto:Ivan.Follender;hbo.com]
Sent: Monday, October 28,
Hi,
servlet
servlet-nameLog4jInit/servlet-name
servlet-classLog4jInit/servlet-class
init-param
param-namelog4j-init-file/param-name
param-valueWEB-INF/log4j.config/param-value
/init-param
Hi,
can anyone tell me if Log4J guarantees that logging by several
concurrent
threads is sequentially correct? Are there specific conditions to be
kept?
This is a question for Ceki, but I think the answer is no. Log4j can't
guarantee it.
Even theoretically, I see this as a problem. Instead,
Hi,
We are using a third-party tool where its debugger
only has the method 'getDebugStream(PrintStream s)'
to config its debug io stream.
OK.
We want to use log4j, which means we need to pass
the streams associated with an Appender (file or
socket appender). Can this be done and how to
get the
Are there any plans to re-write log4j (any next
generation version). It seems that log4j needs
an architectural change rather than anything else.
I wouldn't jump the gun if I were you. :-)
Hi,
Though you have to love it when someone uses a mature, popular system
for a few days, then promptly
Hi,
There are always going to be difference between any two systems designed
to do the same thing. Your system was obviously designed for your
needs, and probably not much more. Log4j is designed to be generic,
useful to a very broad range of people / applications, easily
extensible, and yet
Hi,
If you don't need to use the NTEventLogAppender, you don't need the DLL.
I'd say we use a lot of the features of log4j in production, and we only
use pure java...
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Madhav Inamti [mailto:[EMAIL PROTECTED]]
Sent:
Hi,
What you do, be consistent ;) That'll make it easier to understand and
refactor later if necessary. Other than that, it's a matter of style.
Sometimes it's a matter of personal style, sometimes organizational
guidelines. There's an ISO standard somewhere about this, but I don't
remember
Hi,
Much like are my beloved Patriots going to win the SuperBowl again?,
the answer to your question is almost definitely no. Logger is not
serializable. You can easily and quickly tell that from the JavaDoc,
at:
http://jakarta.apache.org/log4j/docs/api/index.html
(class Logger or an ancestor
Hi,
but I am trying to keep my EJBs pure so that I would not be tied to one
app
server (actually a constraint on my project). I also wanted to manage
the
logging via mbeans. Right now I don't see any clear way to use log4j in
enterprise beans and easily manage the logging at run time.
Here's
Hi,
Every now and then there's a use-case where the logging statements seem
to almost-but-not-quite fit any of the established levels. There are
conceptually two approaches:
- Create your own level
- Use an existing level
Creating your own level is possible in log4j. The downside is that you
Hi,
The upshot of this is the ability to dynamically change the level of
debug messages being viewed.
Chainsaw is great for this with log4j. But that's besides the point.
The reason I like the TRACE level as a standard is not because of the
above. It's because commons-logging expects it and
Hi,
One possible way would be to pick two of the standard log4j levels and
use only those two. For example, DEBUG for verbose and WARN for
standard. You can then easily configure separate appenders for the two
levels, etc.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
Hi,
Did you try Chainsaw? It's great for this purpose!
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: [EMAIL PROTECTED] [mailto:Ulrich.Kleeberger@witt-
weiden.de]
Sent: Friday, August 16, 2002 3:32 AM
To: Log4J Users List
Subject: Antwort: RE: How to view log
Hi,
You shouldn't have any problems using it in the 1.2 versions. Did you
run into something?
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: PRAVIN VAJIRKAR [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 16, 2002 10:53 AM
To: '[EMAIL PROTECTED]'
Subject:
Hi,
Maybe this will work for your needs:
- Add a -Dlog4jConfigFile=/path/to/log4j/config/file to the ant
invocation.
- So now you have a ${log4jConfigFile} property in ant.
- You can pass this to whatever process you use to set up your test
environment. If you have a central JUnit test runner,
Hi,
a little policy-question here:
i'm using log4j-configuration exactly that way (calling
BasicConfigurator.configure() and then
XMLConfigurator to read the config file) to ensure that logging is at
least configured and in case something goes wrong with the config
file (not found, for example)
Howdy,
1.4. on first glance the JDK model seems to be so
similar to what Log4j uses. i think that a discussion
The similarities go a lot deeper than a first glance. They're very
intentional as well. The intent is to make migrating trivial.
about the advantages Log4j has over the JDK logging
Howdy,
DailyRollingFileAppender? Or would I be better off deriving a class
from DailyRollingFileAppender with the new functionality, hoping that
it
later might be rolled in?
That's what I had in mind. It's been done before with
DailyRollingFileAppenderExt, so at least the process will be
Hi,
A basic and genuine question? OK ;)
But log4j is writing output on terminal window though i did not mention
rootlogger and consoleapplender
anywhere, i found that the log4j writes output on terminal window
default.
How can i disable this from printing the log info on window..
That
Hi,
What does your layout conversion pattern for this appender look like?
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: David Hirst [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 9:06 AM
To: [EMAIL PROTECTED]
Subject: newbie logging question
Hi,
I've
log4j.logger.org.mitre.mytravel.ejb.RTSLogger=DEBUG
log4j.logger.org.mitre.mytravel.ejb.GDSLogger=DEBUG
log4j.logger.org.mitre.mytravel.ejb.BookingDirectorLogger=DEBUG
log4j.logger.org.mitre.mytravel.ejb.BookingDataBuilderLogger=DEBUG
log4j.logger.org.mitre.mytravel.ejb.DirectorProxyLogger=DEBUG
Shapira, Yoav wrote:
Hi,
What does your
Hi Vikram,
First of all, thank you for writing the article. All contributions are
welcome and it must have taken a chunk of time.
I like the section towards the end on NDC and MDC and their usage.
The examples (code and configuration) throughout the article were
decent. I would've advocate
Hi,
What's common to the methods that do or don't display the %F:%L ?
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: David Hirst [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 10:11 AM
To: Log4J Users List
Subject: Re: newbie logging question
This is only
: Monday, August 12, 2002 11:29 AM
To: Log4J Users List
Subject: Re: newbie logging question
Both methods are public in a class named GdsBuilderEJB, they also both
share a
private static Logger variable shown below:
private static Logger logger = Logger.getLogger(GdsBuilderEJB);
Shapira, Yoav wrote
Hi,
What happened when you try this? (Without modifying syslog.conf)
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Zhu, Caizhi [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 11:35 AM
To: 'Log4J Users List'
Subject: unix syslog question
Hi all,
Has anyone
Hi Doug,
I am curious to know the use case that required you to extend Category,
CategoryFactory, and Priority. Could you please describe the
requirement and your solutions? Perhaps your work could become part of
the log4j contribs codebase? Thanks,
Yoav Shapira
Millennium ChemInformatics
Hi,
Wow, a new log *file* for every request? Do you really want to be
looking at that many log files? Anyways, here's are a couple of ideas:
- Create the log file programmatically each time:
This is in your service() method, or doGet() or doPost(), whichever is
relevant to your design.
//
Hi,
String filePath = c:\\temp\\test1.log;
Layout myLayout = ...
Appender logFileAppender = new FileAppender(myLayout, filePath);
(you would then do logFileAppender.setLayout() etc.)
Or if the appender exists already:
Logger rootLogger = Logger.getRootLogger();
Appender app =
Hi,
Ceki has already answered, and I myself haven't heard of nor experienced
memory leaks. We have had large, long-lived servers use log4j with many
Loggers and several appenders, never had any problems. However, I'm
curious about something else in your question, and this may make this
thread
Hi,
In the service() method: logger.info(MyServlet: I'm hit! Help!);
Or just do it the normal way, using the server's access file. You don't
want to go down the path of using log4j to record access. Your web
server should have ample provisions for this task.
Yoav Shapira
Millennium
Howdy,
I'd be careful about concluding anything regarding performance when you are running
out of an IDE. Profile the code in a real environment first.
That said, Xerces in the past has been known to have memory leaks. The more Documents
you parse, the more memory it takes. I would
Howdy,
2. Is it possible to associated a log file to an INSTANCE of an object?
I
have object which does quite complex things and which is constructed
with
an Id. I would like to associate one log file per instance, such as
log-id1
and log-id2 if I do new ComplexObject(id1); and new
Howdy,
I second the interest in that. Check the contribs packages to see if
there's something close.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Craig Smith [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 9:12 AM
To: [EMAIL PROTECTED]
Subject:
Hi,
It sounds like some of your problems come from relying on the default
log4j startup configuration, where it looks for log4j.properties on the
classpath. A possible alternative, the one we use, is to write a
startup servlet that loads on server startup and does the log4j
configuration for
Howdy,
I don't think that's part of log4j's job. I'd be surprised it if were possible to do,
using log4j only. However, it would be easy to write a shell script to copy all files
except mylogs.log to the backup directory every day.
Yoav Shapira
Millennium ChemInformatics
-Original
Howdy,
commons-logging is part of the Commons Logging package. It's
not related to log4j except on the conceptual level, both being
dynamically configurable logging frameworks. I think commons-logging
actually allows you to use log4j as the underlying mechanism though.
Therefore, your question
Howdy,
Why is saving memory not important?
Saving memory is important. However, like Ceki said (I've verified this
using a profiler for our system), the Logger instances (even at 1 for
each class) take so much less memory than your application classes, that
their memory footprint is
Howdy,
Please post your configuration file. Thanks,
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Edward Q. Bridges [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 3:56 PM
To: [EMAIL PROTECTED]
Subject: ClassCastException in 1.2.4
this is a new error that
Hi,
We use keywords that identify large processes / jobs within the
applications. So in all the log statements relevant to process A,
there'd be a string like processAPerformance or whatever. We then
have little java command line utilities to analyze log files and output
performance
, William [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 14, 2002 11:22 AM
To: 'Log4J Users List'
Subject: RE: Performance logging
At what level do you output the string? INFO?
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 14, 2002 10:31 AM
To: Log4J
Howdy,
Do the two programs (or n instances of the program, in general) have the
exact same log4j configuration file? i.e. are they writing to the same
RollingFileAppender, and using the same TelnetAppender?
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Marc Herren
Howdy,
I had a bet with a co-worker that Sara Prigge would be the first to
respond with the jar attached. ;) ;) ;) I've been on this list for too
long ;)
Does the DailyRollingFileAppenderExt need updating for v1.2?
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From:
Howdy,
You're probably outputting log4j statements before the log4j system is
configured. You need to make sure you call something like
PropertyConfigurator.configure(your config file path) before making any
log4j statements. A good place to do this is in the init() method of a
servlet that you
Howdy,
public void init(ServletConfig config) throws
ServletException{
super.init(config);
prefix = getServletContext().getRealPath(/);
file = getInitParameter(log4j-init-file);
System.out.println(Prefix: + prefix);
Howdy,
I don't know the answer, but I wanted to say I'm very interested in this question as
well. Mr. Gülcü or anyone else care to comment? ;)
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 30, 2002 8:52 AM
Howdy,
It'd be a good idea for you to define a root logger, as in
log4j.rootLogger=DEBUG, chart
Then your personal classes, e.g.
log4j.logger.com.neuroquest.cais.web.velocity.RunningChart=DEBUG
Then your appender properties for the chart appender, as below. They
seem to make sense. One thing
Howdy,
It's definitely and easily possible with log4j. See the javadoc for
DailyRollingFileAppender. (If you've never used log4j before, it may make better
sense if you read the short manual first).
Depending on how your own logging mechanism works, it may make sense to use a façade
and
,
krishna
--- Shapira, Yoav [EMAIL PROTECTED] wrote:
Hi,
Try using the actual name of the host, something
other than localhost.
Just an idea ;)
Yoav Shapira
ChemInformatics
-Original Message-
From: Krishna srinivasan
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 02, 2002 5:57 AM
Hi,
Try using the actual name of the host, something other than localhost.
Just an idea ;)
Yoav Shapira
ChemInformatics
-Original Message-
From: Krishna srinivasan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 02, 2002 5:57 AM
To: Log4J Users List
Subject: chainsaw
Hi all,
i'm having
Hi,
Like someone else in the list, we've made it a convention to add the
check everywhere we use logger.debug(). Obviously, it may not be a big
deal unless you have thousands of debugging statements and/or
debug-level statements in code that gets executed very frequently.
On a bright note, if
Hi,
So a couple of points...
1) I prefer log4j. From the time I first downloaded it, it was very
easy to set up, use, and re-configure (at both design and run time,
including on very large scale production systems). The
DailyRollingFileAppender works great for me ;) I like that it's free,
Howdy,
Check out the external utilities for log4j at the download page:
http://jakarta.apache.org/log4j/docs/download.html
I personally use Chainsaw and like it a lot, haven't tried any others.
Yoav Shapira
ChemInformatics
-Original Message-
From: hello [mailto:[EMAIL PROTECTED]]
201 - 262 of 262 matches
Mail list logo