Re: Root logger appenders in log4j 1.3

2007-02-22 Thread Jacob Kjome
That's an interesting quote. I have to admit that I haven't read the Log4j manual and that's new to me. In Log4j, reconfigurations are genrally not destructive. They are cumulative. It sounds like the manual is claiming that the ROOT logger is an exception to the rule. Have you tried thi

Re: Throwing IllegalArgumentException when using RollingFileAppender

2007-02-20 Thread Jacob Kjome
g properties of Log4j-1.1.3. It's possible that the 1.1.3 config is not compatible with the 1.2.x config. The remedy here is to put log4j.properties or log4j.xml in WEB-INF/classes that is compatible with Log4j-1.2.xx Jake > > Regards > Prathib Kumar > > Jacob Kjome <[E

Re: ContextJNDISelector setup?

2007-02-18 Thread Jacob Kjome
Moving discussion to the Log4j user list where it should be... Here's some things to try... 1. "classpath:log4j.xml" is not a valid classpath URL. It's a pseudo-URL supported by Springframework, which is probably where you picked this usage up. Log4j doesn't recognize this pseudo-URL synt

Re: Throwing IllegalArgumentException when using RollingFileAppender

2007-02-15 Thread Jacob Kjome
I wouldn't be mixing Log4j 1.1.3 and 1.2.13. Why are you using two different versions? Pick one (the newer one) and call it a day. In fact, download 1.2.14 just to make sure you are up to date with the latest and greatest. Jake At 08:31 PM 2/13/2007, you wrote: Hi, Our product is havin

Re: web dashboard for log4j

2007-02-10 Thread Jacob Kjome
At 08:03 AM 2/10/2007, you wrote: >> Is there something in java for log4j similar to this web interface >> that exists for l4n ? >> >> http://www.l4ndash.com/ > >Hi Ricardo, > >I'm working on a similar project right now. > Not to discourage your work, but are you sure you aren't reinventi

Re: use of log4j 1.3alpha-8

2007-02-07 Thread Jacob Kjome
Log4j 1.3 may or may not ever have a final release. I suggest using the latest 1.2.xx version unless the 1.3 alpha has something you absolutely need. And if the latter, you may want to provide patches and whatnot to help move it toward a release. Jake At 07:07 AM 2/7/2007, you wrote: >hi

Re: web dashboard for log4j

2007-02-05 Thread Jacob Kjome
Check out LogWeb... http://www.codeczar.com/products/logweb/ Jake Quoting Ricardo Trindade <[EMAIL PROTECTED]>: > Last time I checked chainsaw was swing only, has that changed ? > > thanks, > Ricardo > > > Max Stolyarov wrote: > > Check out chainsaw project > > > > -Original Message-

Re: What is the best way

2007-02-01 Thread Jacob Kjome
Quoting James Stauffer <[EMAIL PROTECTED]>: > Don't put log4j.jar or your log4j config file in a shared location but > put them under each web app. Then your logs should stay separate. > Or use a RepositorySelector implementation, but that's way more complicated than what James suggests. Actua

Re: How to use log4j (log4j.xml) and Maven and Junit??

2007-01-24 Thread Jacob Kjome
is being found. You just haven't specified any appenders for any loggers other than those named after your own package namespace. Jake Quoting Lisa <[EMAIL PROTECTED]>: > > > > > Jacob Kjome visi.com> writes: > > > > > > &g

Re: How to use log4j (log4j.xml) and Maven and Junit??

2007-01-23 Thread Jacob Kjome
Change: -Dlog4j.configuration=c:\tmp\log4j.xml test To: -Dlog4j.configuration=file:///c:/tmp/log4j.xml test Or, just copy log4j.xml to the root directory of your compiled test classes and let Log4j autoconfigure itself. Jake At 04:16 PM 1/23/2007, you wrote: >I have written some JUnit t

Re: Log4j and Serializable classes

2007-01-22 Thread Jacob Kjome
At 10:13 AM 1/22/2007, you wrote: >Hi, > >Log4j works in objects that implements Serializable? > >If so, how this is possible? If a client receives an object from the >server that >implements Serializable, how the client knows how to interpret log4j >instructions? > Log4j Loggers are not Serializ

RE: Missing loggers from getCurrentLoggers() under WAS 5.x

2007-01-19 Thread Jacob Kjome
log4j.jar in the ear. > > >>> and put a copy of log4j.jar in the server's classpath so that all >apps see it. >>> Now you have a single default logger repository to query and JMX >should find all the loggers. >If the PARENT_LAST thing doesn't work, I'

Re: Missing loggers from getCurrentLoggers() under WAS 5.x

2007-01-19 Thread Jacob Kjome
Does Jonas use something similar to the JBoss Unified Classloader? I don't fully understand the Unified Classloader, but from what I've gathered, it seems as if libraries, no matter where they are loaded from, are all part of one uber-classloader. If this is true, and Jonas uses something like t

RE: Logging stops after hours working

2007-01-16 Thread Jacob Kjome
The behavior is curious. I would guess that some other library is configuring Log4j on it's own. This doesn't have to be via a config file. It could be just doing it programmatically. I take it you searched for both log4j.properties *and* log4j.xml. You only mentioned the former, so I th

Re: cannot write to a file with rollingfileappender in log4j1.3

2007-01-15 Thread Jacob Kjome
Quoting dirk ooms <[EMAIL PROTECTED]>: > On Monday 15 January 2007 19:04, Jacob Kjome wrote: > > The file should look something like this... > > > > > > http://logging.apache.org/log4j/"; > > debug="false" threshold="debug"> >

Re: cannot write to a file with rollingfileappender in log4j1.3

2007-01-15 Thread Jacob Kjome
The file should look something like this... http://logging.apache.org/log4j/"; debug="false" threshold="debug"> Jake Quoting Surya Poola <[EMAIL PROTECTED]>: > Hi, > Iam getting the following warnings if iam using DOM Configurator and iam > not getting the log file creat

Re: can log4j.properties be loaded by a server rather than app class loader by default?

2007-01-13 Thread Jacob Kjome
At 11:19 AM 1/12/2007, you wrote: >Jacob Kjome visi.com> writes: >> >> >getClass().getClassLoader().getResource("WEB-INF/config/my_log4j.properties"); >> >> >> The above is totally invalid because the "WEB-INF" directory is not >(n

Re: can log4j.properties be loaded by a server rather than app class loader by default?

2007-01-10 Thread Jacob Kjome
Quoting Reshat Sabiq <[EMAIL PROTECTED]>: > Jacob Kjome visi.com> writes: > > >getClass().getClassLoader().getResource("WEB-INF/config/my_log4j.properties"); > ... > > getClass().getClassLoader().getResource("my_log4j.properties"); &g

Re: log4j.properties

2007-01-09 Thread Jacob Kjome
At 04:21 PM 1/9/2007, you wrote: >I wrote a standalone Java application that uses >commons logging (because of Axis) and log 4j. I am >using a log4j.properties file. When I run the program >from within the development (Eclipse) environment, the >logging works fine. However, when I run the program

Re: can log4j.properties be loaded by a server rather than app class loader by default?

2007-01-09 Thread Jacob Kjome
At 06:30 PM 1/9/2007, you wrote: >I'm just curious if log4j guarantees that it would load the file that >resides in WEB-INF/classes, >as opposed to a similar named class loaded by a parent class loader. > >P.S. Because in general, if i understand correctly, a call like > >getClass().getClassLoader

Re: AW: Loading sequence of log4j

2007-01-08 Thread Jacob Kjome
selector in this case. It sounds like you have a decent system in place. If it works for you, I wouldn't change it. [1] http://www.codeczar.com/products/logweb/index.html >cheers >patrick > >> -Ursprüngliche Nachricht- >> Von: Jacob Kjome [mailto:[EMAIL PROTECTED

RE: Undeploying problem with Tomcat 5.5 and Log4J

2007-01-03 Thread Jacob Kjome
don't use a repository selector, then it would be a problem. If you use a repository selector, then it would only affect your webapp's logger repository and wouldn't be a problem. Jake > > -----Original Message- > From: Jacob Kjome [mailto:[EMAIL PROTECTED] > Sent

Re: Undeploying problem with Tomcat 5.5 and Log4J

2007-01-03 Thread Jacob Kjome
Do you call LogManager.shutdown() in the shutdown method of a ServletContextListener? If not, do so and try again. Jake Quoting "Gilbert, Antoine" <[EMAIL PROTECTED]>: > Hi list > > > > I deploy an application WAR on a Tomcat 5.5 instance. This application > use Log4j (via commons-logging) and

Re: log per thread questions

2006-12-28 Thread Jacob Kjome
You could try using a custom repository selector that is keyed by thread. Log4j-1.3 has one keyed by JNDI. Others out there are keyed by ClassLoader, but that just leads to classloading issues. Look up in your favorite search engine or in the Log4j Wiki. The Log4j -sandbox used to have

Re: Eclipse - Could not create action delegate for id

2006-12-28 Thread Jacob Kjome
There's no clear Log4j-specific issue here. I suggest you contact the author of the article. Jake At 02:16 AM 12/28/2006, you wrote: > >Hi, > >I'm using Eclipse 3.1.2 with Java 1.4.2 and log4j-1.2.8, testing the log4j >example by ibm developerworks: >http://www-128.ibm.com/developerworks/lib

Re: Problem with log4jME

2006-12-28 Thread Jacob Kjome
Do you get logging output otherwise? Is es.app.config.PropPreferences a class where you perform manual configuration of Log4j? If so, then don't define a Logger in a class meant to configure all other loggers or, at least make it an instance variable and don't initialize it until after yo

Re: Loading sequence of log4j

2006-12-28 Thread Jacob Kjome
At 04:04 AM 12/27/2006, you wrote: >On 12/27/06, chuanjiang lo <[EMAIL PROTECTED]> wrote: >> >> I am using PropertyConfigurator.configure in the Listener class >> >> PropertyConfigurator.configure(event.getServletContext >> ().getRealPath("")+"/WEB-INF/foo.xml"); >> 2 things... 1. Never ever us

Re: Loading sequence of log4j

2006-12-26 Thread Jacob Kjome
Don't use a init servlet. The servlet spec makes no guarantee as to when the servlet initialization will happen. It may or may not be at container startup. Use a serlvet context listener. It has methods that are guaranteed to be called at application startup and application shutdown. Her

Re: log4j producing extraneous logging

2006-12-21 Thread Jacob Kjome
BackgroundProcessor[StandardEngine[Catalina]]] - Start >expire sessions >StandardManager at 1166713318861 sessioncount 4 >DEBUG 2006-12-21 10:01:58,862 >[ContainerBackgroundProcessor[StandardEngine[Catalina]]] - End expire sessions >StandardManager processingTime 1 expired session

Re: log4j producing extraneous logging

2006-12-20 Thread Jacob Kjome
006 1:55:45 PM org.apache.catalina.core.ApplicationContext log > > > INFO: ContextListener: contextInitialized() > > > Dec 20, 2006 1:55:45 PM org.apache.catalina.core.ApplicationContext log > > > INFO: SessionListener: contextInitialized() > > > Dec 20, 2006 1:55:45 P

Re: Problem parsing XML document

2006-12-20 Thread Jacob Kjome
Create a ${user.home}/.chainsaw/plugins directory. Jake Quoting baanji <[EMAIL PROTECTED]>: > Hi > > I have given the path of the configuration file (log4j.properties) as a > listener > to look for while loading the chainsaw. But the chainsaw-log window displays > the following error. Any idea

Re: log4j producing extraneous logging

2006-12-20 Thread Jacob Kjome
y server-registry.xml at classpath resource > Dec 20, 2006 1:55:46 PM org.apache.catalina.startup.Catalina start > INFO: Server startup in 2322 ms > DEBUG ManagerBase - Start expire sessions StandardManager > at > 1166641005968 sessioncount 0 > DEBUG ManagerBase

Re: log4j producing extraneous logging

2006-12-19 Thread Jacob Kjome
1. Don't configure from the servlet. Either let Log4j autoconfigure itself by finding log4j.properties or log4j.xml in the classpath or configure from a class that's guaranteed to be called once (or has methods that are guaranteed to be called once) such as a servlet context listener. 2.

Re: quesiton about LoggingEvent

2006-12-19 Thread Jacob Kjome
Did you compile with javac debug enabled? jake Quoting jin xin <[EMAIL PROTECTED]>: > Hi: > > I use the following code > > Class testClass > { > > public void test1() > { > --- > Throwable throwable = null; > Throwable child = new Throwable("test"); > LoggingEvent loggingEvent = new > LoggingEv

Re: log4j conflict

2006-12-19 Thread Jacob Kjome
Log4j should not be in shared/lib. Put either in common/lib or WEB-INF/lib (or both, doesn't really matter), but not shared/lib. And unless you want to share a logger repository and/or use Log4j for Tomcat logging (in which case you would also put commons-logging.jar in common/lib), I would avoi

Re: Log4J with struts and writing to a file

2006-12-15 Thread Jacob Kjome
You can't have a well formed XML document without a starting root element. Add the following after the doctype declaration... http://jakarta.apache.org/log4j/";> Jake At 11:48 AM 12/15/2006, you wrote: >Sorry to bother you all again, but I am trying to get log4j to work >with files and hav

Re: RollingFileAppender problem

2006-12-06 Thread Jacob Kjome
I agree with James. Remove the filter. I don't use filters much, but it seems to me that you've matched the entire range of levels from "debug" all the way to "fatal" and then declared all those levels to *not* be accepted upon match, effectively disabling the entire appender. And I"m not

Re: Change the log hierarchy on a log server

2006-12-05 Thread Jacob Kjome
Quoting Bence Takács <[EMAIL PROTECTED]>: > Thanks for the tip, it works. I can get the MDC. > > But I use Chinsaw to view the logs. And Chainsaw can open only an > XML-formatted log file. Not quite true. Use a LogFilePatternReceiver to load a standard non-XML log file. Jake > The XmlLayout d

RE: Setting up log4j.xml

2006-12-05 Thread Jacob Kjome
Bender, You are correct in your latest analysis, but incorrect on your original analysis. Chuanjiang's original XML file was just fine and the fact that he increased the level to "error" should have made it so that only ERROR messages would print to the A1 appender for that specific logger, whil

Re: German Copy of Log4J Manual posted illegally

2006-12-04 Thread Jacob Kjome
You should post this message directly to the author, Ceki Gulcu. Here's the book's official site: https://www.qos.ch/shop/products/log4j/log4j-Manual.jsp You can find contact information there. Jake Quoting Kamal Ahmed <[EMAIL PROTECTED]>: > Hi, > Someone has posted a German Copy of Log4J at

Re: log4j implementation for web module

2006-11-24 Thread Jacob Kjome
At 01:15 AM 11/24/2006, you wrote: >Hi folks, > I am very new log4j and i want to implement log4j in my >module. I had gone through material in net. > In my module i am having 5 to 6 servlets. For writting log4j >code in web application, we have to provide the properties file like

Re: Sharing appender parameters

2006-11-10 Thread Jacob Kjome
It should work to define the common stuff as properties and reference them further down the file. So... appenderClass=org.apache.log4j.RollingFileAppender ... ... log4j.appender.tuxcat=${appenderClass} Just apply the same thing to all the other common stuff. I haven't tried this, so I ca

Re: Filters

2006-11-09 Thread Jacob Kjome
Quoting James Stauffer <[EMAIL PROTECTED]>: > Code in log4j should only use LogLog for logging Note that this is true for Log4j versions previous to 1.3alpha, but as of 1.3alpha, Log4j uses itself for logging (except for the short time prior to bootstrapping itself). Jake >, which is only sent

Re: Using log4j in Tomcat

2006-11-07 Thread Jacob Kjome
James is correct about the fact that Tomcat sets this system property. However, you should be using ${catalina.base} instead of ${catalina.home}. You may very well have a separate instance of Tomcat with a different base directory than that of ${catalina.home}. In that case that you truly are r

Re: log4j doesn't log files when a app is running on tomcat host

2006-10-25 Thread Jacob Kjome
Where do you put your config file? And is the config file log4j.properties or log4j.xml? Do you use automatic configuration or manual configuration? Jake Quoting James Stauffer <[EMAIL PROTECTED]>: > Can you turn on log4j debugging (set "log4j.debug" system property to > "true")? That might

Re: Logging "Cross Functional" categories in log4j

2006-10-25 Thread Jacob Kjome
You can get that sort of behavior using an MDC based filters on various appenders. There was a thread about a week ago or so that suggested allowing for a custom class to be configured for a logger which would provide custom criteria to determine if a level is enabled. Of course, this is not rea

RE: Struts 1.2.9 INFO logging

2006-10-21 Thread Jacob Kjome
the "R" appender. To correct this, you should use... log4j.rootLogger=info, R log4j.logger.org.apache.struts.action.ActionServlet=debug Notice that the "R" appender is no longer explicitly declared on the ActionServlet logger. This same concept should be applied to all log

RE: Struts 1.2.9 INFO logging

2006-10-20 Thread Jacob Kjome
Where do you put this config file? Is it deployed with your webapp or in CATALINA_HOME/common/classes? BTW, unless you turn off additivity for a particular logging hierarchy, you shouldn't re-declare the appender on the logger when it already exists on the rootLogger. You'll end up with duplica

Re: Struts 1.2.9 INFO logging

2006-10-20 Thread Jacob Kjome
So, where are you seeing the logging now? In the console? What does your log4j config file look like? Do you have commons-logging.jar and log4j.jar in WEB-INF/lib and log4j.properties or log4j.xml in WEB-INF/classes? Jake Quoting Dave Kennedy <[EMAIL PROTECTED]>: > Hi, > ENV: Struts 1.2.9, T

Re: Level per user

2006-10-17 Thread Jacob Kjome
our help. I like the idea, though you do realize that this probably doesn't have a chance of getting into either Log4j-1.2.xx or Log4j-1.3. Log4j-2.0, however, is pretty wide open. I suggest you fill out a Bugzilla feature request and provide a detailed description of what you want there

Re: Multiple log messages

2006-10-16 Thread Jacob Kjome
Don't call configure every time you log. In fact, don't bother calling it at all and just put a log4j.properties or log4j.xml in the root package, or default package, of the classpath. Log4j will configure itself. You only need to worry about logging. Remember, Log4j is additive. Each co

Re: Level per user

2006-10-15 Thread Jacob Kjome
At 05:41 AM 10/15/2006, you wrote: >Hi Jacob, >thanks for your reply. > >Checking in the log4j source code, i saw all log methods and all guard >methods performs something like this: > >public boolean isTraceEnabled() { >if (repository.isDisabled(Level.TRACE_INT)) { >return

Re: Level per user

2006-10-14 Thread Jacob Kjome
At 10:49 AM 10/14/2006, you wrote: >Hi All, >I need to implements a user-level filter. I read in the archive some >threads about that but I didn't found or i didn't understand the right way. >I have a web application and I want to keep the log level to info or >error and just set to debug for a si

Re: Can I change log4j configuration programatically?

2006-10-10 Thread Jacob Kjome
James is probably wondering whether your code is running in a web container, such as Tomcat. In that case, LogWeb might be able to help http://www.codeczar.com/products/logweb/ It works great for me! Jake At 11:38 PM 10/10/2006, you wrote: > >I'm don't quite understand the question. i

Re: i don't see logs

2006-10-10 Thread Jacob Kjome
> log4j.logger.org.hibernate.ps.PreparedStatementCache=WARN > log4j.logger.org.hibernate=WARN > > # Changing the log level to DEBUG will result in Hibernate generated > # SQL to be logged. > log4j.logger.org.hibernate.SQL=ERROR > > # Changing the log level to DEBUG will res

Re: i don't see logs

2006-10-09 Thread Jacob Kjome
What does your Log4j config file look like? Jake At 06:44 AM 10/9/2006, you wrote: > >Hello >I generation project with appfuse-tapestry-1.9.3-src.zip >in action userList.java code i see logs: > >if (log.isDebugEnabled()) > { >log.debug("fetching user with username: " + username); >

Re: KeyFileAppender not closing filehandlers

2006-09-29 Thread Jacob Kjome
I'm not actually sure what the KeyfileApender is, but you should always do this for a ServletContextListener shutdown event.. LogManager.shutdown(); Jake At 08:35 AM 9/29/2006, you wrote: >Hello all. I am quite new to log4j, so please bear with me if I am on the >wrong track. Any feedback i

Re: extra method for PropertyConfigurator

2006-09-29 Thread Jacob Kjome
> >As far as the location of the config file, that is assumed to be in in WEB-INF >unless otherwise specified the "log4j-config" context param. > > >Jake > >> Right ? >> >> Maarten >> >> On 9/29/06, Jacob Kjome <[EMAIL PROTECTED]> wr

Re: extra method for PropertyConfigurator

2006-09-29 Thread Jacob Kjome
;log4j-config" context param. Jake > Right ? > > Maarten > > On 9/29/06, Jacob Kjome <[EMAIL PROTECTED]> wrote: > > At 06:39 AM 9/28/2006, you wrote: > > >Jake, I don't think your solution solves my problem ;-) > > > > > >If I un

Re: extra method for PropertyConfigurator

2006-09-28 Thread Jacob Kjome
provide the option. >Or did I misunderstand your solution ? You mostly got it. I hope I filled in the rest above. Does it make sense now? Jake > >I will create a JIRA issue and try to attach an implementation. >Trevor, thanks for letting me know that it works. > >Maarten

Re: log4j doesn't log files when weblogic is run as a windows service.

2006-09-28 Thread Jacob Kjome
ties file in system classpath. >It didn't work and hence I took the file url approach. Any wild guess >why log4j wouldn't pick up from classpath? > >Thanks, >Abbas > >- Original Message >From: Jacob Kjome <[EMAIL PROTECTED]> >To: Log4J Users List

Re: log4j doesn't log files when weblogic is run as a windows service.

2006-09-28 Thread Jacob Kjome
x is so simple. LogManager loads the properties file using the URL. I > just provided file url and it was all done. Thanks for your help, Jacob. > -Abbas > > - Original Message > From: Jacob Kjome <[EMAIL PROTECTED]> > To: Log4J Users List ; Mirza Abbas Raza &

Re: log4j doesn't log files when weblogic is run as a windows service.

2006-09-27 Thread Jacob Kjome
didn't find one. > > thanks, > Abbas > > - Original Message > From: Jacob Kjome <[EMAIL PROTECTED]> > To: Log4J Users List ; Mirza Abbas Raza > <[EMAIL PROTECTED]> > Sent: Wednesday, September 27, 2006 1:38:12 PM > Subject: Re: log4j do

Re: log4j doesn't log files when weblogic is run as a windows service.

2006-09-27 Thread Jacob Kjome
#x27; has an instance of AppenderAttachableImpl for an appender, in > the callAppenders() api of Category class. However, 'aai' is null when the > application is run as windows service. Appreciate your help. > > Thanks, > Abbas > > > - Original Message >

Re: Simple example for JMSAppender usage (without JNDI)

2006-09-27 Thread Jacob Kjome
Quoting Henning Sprang <[EMAIL PROTECTED]>: > Hi, > I want to use the JMSAppender class in a simple environment, where we > don't have a jndi service running. Because I have not so much > knowledge about JNDI and we simply don't need it. > You should look into Spring's Mock classes. Specifically

Re: extra method for PropertyConfigurator

2006-09-27 Thread Jacob Kjome
That's an intersting idea. You can post an enhancement report in bugzilla along with your implementation. However, I'm not sure if this would be something that would go into Log4j-1.2.xx because it is pretty much in bugfix mode. New development is on the trunk for the 1.3.xx releases. The way

RE: Disable logging for certain exceptions

2006-09-22 Thread Jacob Kjome
Are you willing to have no logging information coming from the MyClass.class logger going to the event log? In that case, using additivity=false on that particular logger will work. Otherwise, you will either have to set up a differently named logger which you use for exception logging only, whi

Re: log4j doesn't log files when weblogic is run as a windows service.

2006-09-18 Thread Jacob Kjome
y\domains\mydomain\conf\managedwrapper.conf". The logs/node > directory is located in mydomain directory. Wouldn't this point the logs to > the right directory? > > Thanks, > Abbas > > > - Original Message > From: Jacob Kjome <[EMAIL PROTECTED]> &

Re: log4j doesn't log files when weblogic is run as a windows service.

2006-09-18 Thread Jacob Kjome
I'll bet they *do* get created. You just don't know where to look. What does your config look like? Does it use relative paths to the files? Keep in mind, relative paths are relative to the directory from which the JVM started. So, if you start on the command line, the path in the config file

Re: setRepositorySelector, guard and redeploy

2006-09-18 Thread Jacob Kjome
Quoting jan_bar <[EMAIL PROTECTED]>: > Thanks for your extensive answer, see inline.. > > > Well, when you are using a repository selector, the idea is that you > > have Log4j in a position where it is not part of your app, but part > > of the server; otherwise there's no point to using a reposito

RE: How configure the categories for console, logFile and htmlFile showing different levels

2006-09-18 Thread Jacob Kjome
libraries. That's called "additivity". So, please try my version. It does exactly what you want as far as I can decifer from your original config file and fixes some of its bugs. Jake > Thanks a lot, > > David > > I am going to add this new feature on Bugzila

RE: How configure the categories for console, logFile and htmlFile showing different levels

2006-09-17 Thread Jacob Kjome
At 07:19 PM 9/17/2006, you wrote: Dear Bender, Thanks four your xml sample now it works as I expect, on the attached file you will find it. Nevertheless I have some comments, I am not log4j expert, but I guess the syntax could be simplified, and probably it is possible: 1. With your sugge

Re: Logger.getRootLogger() ?? is't static with respect to the JVM ?

2006-09-17 Thread Jacob Kjome
ALL); >> BasicConfigurator.configure(); >> logger.info("this is the application class"); >> >> The heirerachy I am expecting is as follow: >> >> rootLogger >> / | \ >> comp1Logger mainLogger comp2Logger >> >> >> If that's co

Re: trace( String, Throwable)

2006-09-17 Thread Jacob Kjome
d JVM issue. >> I didn't test it with trace, yet. I will report again if I find it a >> problem. >> Thanx >> >> >> Jacob Kjome wrote: >> >>> >>> If you are new to Log4j, I would avoid using 1.3alpha. You are >>> welcome to report a bug

Re: Logger.getRootLogger() ?? is't static with respect to the JVM ?

2006-09-17 Thread Jacob Kjome
At 05:42 PM 9/16/2006, you wrote: >Hello every body: >I am having some difficulties working with log4j, and I need some help >from some one. >I am writing a client/server application, in some way it can be compared >with a chat client, where two or more users connect to the server >through an appl

Re: trace( String, Throwable)

2006-09-17 Thread Jacob Kjome
new FrameAppender(this,"Controller logs")); >BasicConfigurator.configure(); >logger.setLevel(Level.ALL); >logger.info("controller initialized "); > >All the loggings are showing except the trace level !! >I just used logger.debug instead and it worked fine. &g

Re: trace( String, Throwable)

2006-09-16 Thread Jacob Kjome
At 11:23 AM 9/16/2006, you wrote: >I changed it to logger.error, and it worked fine. Now I checked again >the configuration and couldn't find what's wrong. >May be this ?? > >logger.setLevel(Level.ALL); > >but isn't suppose to log all levels ?? >if I am wrong, how do i fix this ?? > Theoreticall

Re: setRepositorySelector, guard and redeploy

2006-09-15 Thread Jacob Kjome
Well, when you are using a repository selector, the idea is that you have Log4j in a position where it is not part of your app, but part of the server; otherwise there's no point to using a repository selector. In order for a server wide instance of Log4j to service many apps without each o

Re: How to include the compiled classes

2006-09-10 Thread Jacob Kjome
Just wanted to mention that after I used JarJar 0.7, even cases using reflection worked great. I had been using 0.6, which still had some bad behavior there. Seems perfect now. I used it on Xerces2 and I've noticed no problems. Jake At 03:34 PM 9/10/2006, you wrote: > >Use Ant to unjar t

Re: How to include the compiled classes

2006-09-10 Thread Jacob Kjome
Use Ant to unjar to your classpath and then jar everything back up again. You can also use . Alternatively, you can use JarJar [1]. The really nifty thing about JarJar is that you can actually modify the package for Log4j and move it into your own namespace. Not sure if this is something

RE: Additivity for org.apache.log4j can not be set?

2006-09-04 Thread Jacob Kjome
At 01:58 AM 9/4/2006, you wrote: >From: Curt Arnold [mailto:[EMAIL PROTECTED] > >> Things particularly get >> interesting in configuration as log messages are cached until the >> configuration is complete and then replayed through the newly >> configured logging hierarchy. That additivity doesn't

Re: How can i built a java application using java debug class on

2006-08-28 Thread Jacob Kjome
AOP (Aspect Oriented Programming) + Log4j would fit the bill here. Like James said, Log4j has no way to do this automagically. Jake Quoting James Stauffer <[EMAIL PROTECTED]>: > AFAIK there is no way for log4j to automatically log every method > entry/exit without explicit logging statements.

Re: I get Exception if tomcat reloads a class

2006-08-23 Thread Jacob Kjome
I would report this as a bug in Bugzilla (I wonder when we will move to Jira like most other Apache projects?)... http://issues.apache.org/bugzilla/ BTW, do you have code in a servlet context listener to close down Log4j upon application shutdown? I'm not sure it will solve this issue, but

Re: AW: using variables in log4j xml file

2006-08-22 Thread Jacob Kjome
is what you are looking for) > 2. if you want to access the OS environment property then you have to access > it with ${env.MY_PROPERTY} > > so on windows you would do > SET MY_PROPERTY=c:\my_log_directory > > and in your log4j.xml you would access it: > > > p

Re: JDBC Appender

2006-08-22 Thread Jacob Kjome
Url");* > > My log4j.xml entry is: > > ** > > Why is it happening? I understand that you can store only one value in the > database using NDC. Please correct me if I am wrong. > > Thanks & Regards > > Merin > > > On 8/21/06, Jacob Kjome <[EMAIL PRO

RE: using variables in log4j xml file

2006-08-21 Thread Jacob Kjome
java option but they didn't seem to work. Do you have any idea why? > > Farzad- > > -Original Message- > From: Jacob Kjome [mailto:[EMAIL PROTECTED] > Sent: Monday, August 21, 2006 3:41 PM > To: Log4J Users List > Subject: Re: using variables in log4j xml file

Re: using variables in log4j xml file

2006-08-21 Thread Jacob Kjome
When you say "environment variables", do you mean System (JVM-wide) properties? If so, then you just reference them as ${mysyspropname}. I imagine that JBoss sets some system properties and that is probably what you are seeing referenced in the log4j config files you speak of. The example you p

RE: JDBC Appender

2006-08-21 Thread Jacob Kjome
If you want to use MDC or NDC, you will have to register the values using your classes. However, once you have that, you can redefine the layout of your appender in the config file without changing your classes. This article provides both an example of a JDBCAppender configuration and talks abou

Re: Fwd: log file should be overwritten

2006-08-21 Thread Jacob Kjome
The file appender will only append to a log file if it is specified in the config. Don't specify it in the config and it won't append. Of course, this means on application restart, not for each log statement. I can't imagine why one would want to overwrite for each log statement, but I just wan

Re: different config files for different tomcat applications

2006-08-17 Thread Jacob Kjome
To clarify for James, it is absolutely ok for log4j.jar to be in *both* common/lib and each app's WEB-INF/lib... at least in the case of Tomcat where it implements child-first classloading behavior. Child-first classloading makes it so that WEB-INF/lib/log4j.jar gets loaded in preference to any l

Re: different config files for different tomcat applications

2006-08-15 Thread Jacob Kjome
log4j.jar under tomcat/shared or > > > tomcat/common > > > 2. Only have log4j.properties and log4j.jar under webapps//WEB-INF > > > > > > For #2 you might be able to put log4j.properties and log4j.jar > > > someplace that tomcat can see them but not the ap

Re: different config files for different tomcat applications

2006-08-14 Thread Jacob Kjome
Is there a log4j.xml anywhere on the classpath (in the default package, that is)? Look in directories and jars. I would suggest changing to an XML config file because Log4j looks for it first. If it doesn't find log4j.xml, then it looks for log4j.properties. I've seen this happen so often to u

Re: need help to use chainsaw VFSLogFilePatternReceiver

2006-08-11 Thread Jacob Kjome
At 04:57 AM 8/11/2006, you wrote: >Scott and Jake, >Thanks to your help, now it works, >It seems that my fileURL was not containing the complete host-domain >name (it works for pscp with only the hostname but not with >chainsaw/jsch). > Glad to hear you go it working. However, I would bet that y

Re: need help to use chainsaw VFSLogFilePatternReceiver

2006-08-10 Thread Jacob Kjome
Quoting Bruno Cosnefroy <[EMAIL PROTECTED]>: > Hi, > > Thanks a lot for your answers, > > I've used Jacob's class and now I have a valid line for my remote host > in my known_hosts file (though the class execution never ends). > Yeah, just hit ctrl+c. The connection is still open. I suppose I c

RE: need help to use chainsaw VFSLogFilePatternReceiver

2006-08-09 Thread Jacob Kjome
I my experience, putty doesn't add anything to known_hosts. I'm not sure about what cygwin does? However, JSCH can do that by setting strict host checking to "no". The following code will add the host + the host key to your known_hosts for you (assuming you've created it already.. it won't be c

Re: configuration of DBAppender with Log4j....

2006-07-26 Thread Jacob Kjome
Hi Yaramaka, You wrote two separate emails in a row to this list with completely different attempts at solving the same problem. Besides that, you wrote to my personal email address 3 times trying to get me to write your config file. Your sense of email list etiquette is lacking. It's als

RE: Struts and commons logging

2006-07-11 Thread Jacob Kjome
ed to provide such a config file. So, just configure Log4j and you should be golden. Jake Quoting Raghuveer <[EMAIL PROTECTED]>: > Where shall we nned to add below code.is it in struts-config or log.xml > > -Original Message- > From: Jacob Kjome [mailto:[EMAIL PROTECTED]

Re: Struts and commons logging

2006-07-10 Thread Jacob Kjome
Quoting Raghuveer <[EMAIL PROTECTED]>: > We use struts applications and loggging by log 4j. > > We are configuring loggers like normal MVS application. > > But, > What is that i need to do if i want my struts application to use > commons-logging for logging. > I'm not quite sure I understand the

RE: NoClassDefFound Error for org/apache/log4j/Layout

2006-06-29 Thread Jacob Kjome
What does line 20 do? Does it configure Log4j? What JDK are you using? What, exactly, does your classpath look like? Jake Quoting venkatlakshmi <[EMAIL PROTECTED]>: > Yes, I have included it in the classpath also. > > Still it gives me the error. > > --- Bender Heri <[EMAIL PROTECTED]> wrote:

Re: Adding multiple configuration files to log4j

2006-06-24 Thread Jacob Kjome
You can [re]configure Log4j as many times as you want. Configuration is additive. Once reconfiguration does not blow away the old. I'm not sure what you describe is something Log4j ought to support at its core. You are welcome to create your own startup class that behaves this way and jus

<    1   2   3   4   5   6   7   8   9   >