RE: OutOfMemoryError using Log4J

2002-11-21 Thread Shapira, Yoav
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

RE: Line numbers and method name of calling class

2002-11-21 Thread Shapira, Yoav
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:

RE: log4j messages to String conversion?

2002-11-08 Thread Shapira, Yoav
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

RE: How to configure SMTPAppender?

2002-11-08 Thread Shapira, Yoav
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,

RE: How to configure SMTPAppender?

2002-11-08 Thread Shapira, Yoav
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

RE: Is configureAndWatch unique to Log4j?

2002-11-07 Thread Shapira, Yoav
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

RE: Specifying default configuration file for Tomcat

2002-11-01 Thread Shapira, Yoav
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:

RE: JRun4, WebLogic 7.0 Log4J bufferedIO exception

2002-10-30 Thread Shapira, Yoav
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

RE: JRun4, WebLogic 7.0 Log4J bufferedIO exception

2002-10-30 Thread Shapira, Yoav
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

RE: log4j MDC in Weblogic 6.1 server

2002-10-28 Thread Shapira, Yoav
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,

RE: Log4j: Using servlet to init, but how to reload???

2002-10-24 Thread Shapira, Yoav
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

RE: logging by concurrent threads

2002-10-18 Thread Shapira, Yoav
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,

RE: How to get PrintStream of an Appender?

2002-10-10 Thread Shapira, Yoav
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

RE: Performance between Log4j and custom in-house logger

2002-09-04 Thread Shapira, Yoav
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

RE: Performance between Log4j and custom in-house logger

2002-09-03 Thread Shapira, Yoav
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

RE: pure java log4j

2002-08-28 Thread Shapira, Yoav
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:

RE: Logging idioms or guidelines: anyone have some?

2002-08-27 Thread Shapira, Yoav
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

RE: Logger serializable?

2002-08-21 Thread Shapira, Yoav
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

RE: Logger serializable?

2002-08-21 Thread Shapira, Yoav
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

RE: New Level?

2002-08-20 Thread Shapira, Yoav
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

RE: New Level?

2002-08-20 Thread Shapira, Yoav
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

RE: How to define custome log level?

2002-08-19 Thread Shapira, Yoav
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-

RE: Antwort: RE: How to view log remotely using log4j

2002-08-16 Thread Shapira, Yoav
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

RE: DailyRollingFileAppenderExt Compatibility

2002-08-16 Thread Shapira, Yoav
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:

RE: Log4J, JUnit ANT

2002-08-16 Thread Shapira, Yoav
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,

RE: Configuration question (WAS: A basic and genuine question)

2002-08-14 Thread Shapira, Yoav
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)

RE: Article Info

2002-08-14 Thread Shapira, Yoav
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

RE: Feature request for DailyRollingFileAppender

2002-08-13 Thread Shapira, Yoav
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

RE: A basic and genuine question

2002-08-13 Thread Shapira, Yoav
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

RE: newbie logging question

2002-08-12 Thread Shapira, Yoav
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

RE: newbie logging question

2002-08-12 Thread Shapira, Yoav
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

RE: Article Info

2002-08-12 Thread Shapira, Yoav
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

RE: newbie logging question

2002-08-12 Thread Shapira, Yoav
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

RE: newbie logging question

2002-08-12 Thread Shapira, Yoav
: 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

RE: unix syslog question

2002-08-12 Thread Shapira, Yoav
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

RE: log4j 1.2 not fully compatible with 1.1

2002-08-09 Thread Shapira, Yoav
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

RE: servlet logging

2002-07-31 Thread Shapira, Yoav
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. //

RE: log4j config parameters

2002-07-31 Thread Shapira, Yoav
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 =

RE: Memory Leaks in Log4j

2002-07-31 Thread Shapira, Yoav
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

RE: Can we get the number of hits to a servlet using log4j

2002-07-31 Thread Shapira, Yoav
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

RE: lack of memory

2002-07-25 Thread Shapira, Yoav
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

RE: Advanced questions ? (I hope)

2002-07-24 Thread Shapira, Yoav
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

RE: SNMPAppender

2002-07-24 Thread Shapira, Yoav
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:

RE: large scale log4j configuration

2002-07-24 Thread Shapira, Yoav
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

RE: DailyRollingFileAppender+ backup

2002-07-23 Thread Shapira, Yoav
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

RE: Logging Problem (think it is log4j)

2002-07-11 Thread Shapira, Yoav
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

RE: StaticHierarchy class?

2002-06-21 Thread Shapira, Yoav
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

RE: ClassCastException in 1.2.4

2002-06-20 Thread Shapira, Yoav
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

RE: Performance logging

2002-06-14 Thread Shapira, Yoav
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

RE: Performance logging

2002-06-14 Thread Shapira, Yoav
, 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

RE: Bug with Telnet and RollingFileAppender ?

2002-06-12 Thread Shapira, Yoav
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

RE: DailyRollingFileAppenderExt

2002-06-05 Thread Shapira, Yoav
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:

RE: logger not working with servlet

2002-06-05 Thread Shapira, Yoav
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

RE: logger not working with servlet

2002-06-05 Thread Shapira, Yoav
Howdy, public void init(ServletConfig config) throws ServletException{ super.init(config); prefix = getServletContext().getRealPath(/); file = getInitParameter(log4j-init-file); System.out.println(Prefix: + prefix);

RE: Log4j and Tomcat apps

2002-05-30 Thread Shapira, Yoav
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

RE: console/file config

2002-05-29 Thread Shapira, Yoav
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

RE: Using log4j

2002-05-21 Thread Shapira, Yoav
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

RE: chainsaw

2002-05-03 Thread Shapira, Yoav
, 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

RE: chainsaw

2002-05-02 Thread Shapira, Yoav
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

RE: log4j performance

2002-04-19 Thread Shapira, Yoav
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

RE: log4j vs jdk 1.4 logging

2002-04-11 Thread Shapira, Yoav
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,

RE: Log4j's UI

2002-04-03 Thread Shapira, Yoav
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]]

<    1   2   3