Re: Passing arrays as parameters via log4j.xml & log4j.properties

2017-12-07 Thread Matt Sicker
> > > Can some one let me know is it possible to pass array or list to a log4j > appender property via log4j.xml or log4j.properties? > > Something like below in appender I want to populate via log4j.xml or > log4j.properties > > private List validPackages; > pub

Passing arrays as parameters via log4j.xml & log4j.properties

2017-12-07 Thread Debraj Manna
Cross posting from stackoverflow <https://stackoverflow.com/questions/47688508/passing-arrays-as-parameters-via-log4j-xml-log4j-properties> Can some one let me know is it possible to pass array or list to a log4j appender property via log4j.xml or log4j.properties? Something like be

Re: Logging using log4j.xml 2

2014-08-07 Thread Mohit Anchlia
I realized it later and changed it to log4j2.xml and now it works On Thu, Aug 7, 2014 at 3:35 PM, Remko Popma wrote: > The config file should be named log4j2.xml, not log4j.xml. Did you try > that? > > Remko > > Sent from my iPhone > > > On 2014/08/08, at 7:16, Mohi

Re: Logging using log4j.xml 2

2014-08-07 Thread Matt Sicker
Are you naming the file log4j2.xml? On 7 August 2014 17:16, Mohit Anchlia wrote: > I have below xml but my application is not printing the logs to console. I > am running through eclipse and this file is in main/resources. > > > > > > > > > > %msg%n"*/> > > > > > > > > > > > > > > >

Re: Logging using log4j.xml 2

2014-08-07 Thread Remko Popma
The config file should be named log4j2.xml, not log4j.xml. Did you try that? Remko Sent from my iPhone > On 2014/08/08, at 7:16, Mohit Anchlia wrote: > > I have below xml but my application is not printing the logs to console. I > am running through eclipse and this file is in ma

Logging using log4j.xml 2

2014-08-07 Thread Mohit Anchlia
I have below xml but my application is not printing the logs to console. I am running through eclipse and this file is in main/resources.

Re: Multiple log4j.xml in classpath

2012-10-18 Thread Vladimir S
ometimes jars pack their own versions of log4j.xml and as a result can > be > > unpredictably picked up by the JVM Classloader. > > Is there a way to figure out which log4j.xml is getting loaded into the > > classpath? Can I query some attribute of the Logger object to see which > > log4j.xml its using? > > > > > > Thank You > > Vladimir >

Re: Multiple log4j.xml in classpath

2012-10-18 Thread Joseph
Is this what u want?try out with -Dlog4j.debug 在 2012-10-19,10:18,Vladimir S 写道: > All, > > Sometimes jars pack their own versions of log4j.xml and as a result can be > unpredictably picked up by the JVM Classloader. > Is there a way to figure out which log4j.xml is getting

Re: log4j.xml problem

2012-09-26 Thread Douglas E Wegscheid
that is correct. you should only see WARN on up. I verified it: this only logs the WARN when run against your log4j.xml. import org.apache.log4j.Logger; public class L { public static void main (String[] args) { Logger logger = Logger.getLogger(L.class); logger.info("

Re: log4j.xml problem

2012-09-26 Thread Oliver Ruebenacker
Hello, On Wed, Sep 26, 2012 at 2:46 PM, Douglas E Wegscheid wrote: > at least one problem higher in the file (lines 27 and 31): too many XML > comment closes (-->) Thanks! That made the parse error messages disappear. Unfortunately, the file still seems to have no effect. Let me che

Re: log4j.xml problem

2012-09-26 Thread Douglas E Wegscheid
at least one problem higher in the file (lines 27 and 31): too many XML comment closes (-->) --> --> good XML editor is recommended ■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER (269) 923-5278 // douglas_e_wegsch...@whirlpool.com "A wrong note played hesitatingly is a wrong note. A wr

Re: log4j.xml problem

2012-09-26 Thread Oliver Ruebenacker
Hello, Oops, sorry, I attached the wrong file. Attached is the right one. Thanks! Take care Oliver On Wed, Sep 26, 2012 at 12:44 PM, Douglas E Wegscheid wrote: > be willing to look at it, but it looks like you attached your web.xml > instead of the log4j.xml >

Re: log4j.xml problem

2012-09-26 Thread Douglas E Wegscheid
be willing to look at it, but it looks like you attached your web.xml instead of the log4j.xml ■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER (269) 923-5278 // douglas_e_wegsch...@whirlpool.com "A wrong note played hesitatingly is a wrong note. A wrong note played with conviction is interpret

Using CompositeTriggeringPolicy with log4j.xml

2011-05-26 Thread Thomas Fischer
Hello all, I want to configure a CompositeTriggeringPolicy inside my log4j.xml, but I have not been able to find any documentation on how to pass individual triggering policies to it. The Javadoc doesn't seem to address the issue. Could anyone please give me a short example of how th

Re: Setting properties for log4j.xml configuration file

2011-03-13 Thread Thomas Wiedmann
Meanwhile I found the solution (for all, who'll might have the same question in future:) by defining an XML entity declaring the logfiles directory (or any other parameter, required, to be referenced in the log4j.xml) - Sample: "C:/MyProject/MyLogs"

Re: Setting properties for log4j.xml configuration file

2011-02-22 Thread Jacob Kjome
ery convenient way to define (and to administer) such parameters only once globally for the entire log configuration and to use it on several references as here in the appenders configuration. How can such global system properties be defined in xml-based configuration files (log4j.xml)? Where is it doc

Re: Setting properties for log4j.xml configuration file

2011-02-21 Thread Thomas Wiedmann
meters only once globally for the entire log configuration and to use it on several references as here in the appenders configuration. How can such global system properties be defined in xml-based configuration files (log4j.xml)? Where is it documented? I'd fo

Re: Setting properties for log4j.xml configuration file

2011-02-21 Thread Curt Arnold
appender.MyAppender2.File=${log4j.logdir}/MyAppender2.log >>> >>> I found this is a very convenient way to define (and to administer) such >>> parameters only once globally for the entire log configuration and to use >>> it on several references as here in the appenders

Re: Setting properties for log4j.xml configuration file

2011-02-21 Thread Jacob Kjome
) such >> parameters only once globally for the entire log configuration and to use it >> on several references as here in the appenders configuration. >> >> How can such global system properties be defined in xml-based configuration >> files (log4j.xml)? >>

Re: Setting properties for log4j.xml configuration file

2011-02-20 Thread Curt Arnold
der2.log > > I found this is a very convenient way to define (and to administer) such > parameters only once globally for the entire log configuration and to use it > on several references as here in the appenders configuration. > > How can such global system properties be

Re: Setting properties for log4j.xml configuration file

2011-02-20 Thread Christian Grobmeier
configuration. > > How can such global system properties be defined in xml-based configuration > files (log4j.xml)? > Where is it documented? I'd found no hint about it. > > Thomas Wiedmann > > > - > To

Setting properties for log4j.xml configuration file

2011-02-20 Thread Thomas Wiedmann
defined in xml-based configuration files (log4j.xml)? Where is it documented? I'd found no hint about it. Thomas Wiedmann - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e

A question on log4j.xml

2010-09-06 Thread 王科选
appender*,plugin*, *(category|logger)*,root?*, (categoryFactory|loggerFactory)?)> This line of code is copied from the log4j.dtd. Every time I edit or view the log4j.xml, it's not so pleasant to have to scroll down the ed

RE: Regarding log4j.xml

2010-04-16 Thread Baskaradoss, B - SPLXM
ginal Message- From: Curt Arnold [mailto:curt.ar...@gmail.com] On Behalf Of Curt Arnold Sent: Friday, April 16, 2010 2:23 PM To: Log4J Users List Subject: Re: Regarding log4j.xml On Apr 16, 2010, at 7:03 AM, Baskaradoss, B - SPLXM wrote: > Hi All, > > > > I've attached

Re: Regarding log4j.xml

2010-04-16 Thread Curt Arnold
On Apr 16, 2010, at 7:03 AM, Baskaradoss, B - SPLXM wrote: > Hi All, > > > > I've attached my part of log4j.xml file below, Can any one explain me > what does that debug="false" mean in first line below? > > Setting it to true would enable log4j'

Regarding log4j.xml

2010-04-16 Thread Baskaradoss, B - SPLXM
Hi All, I've attached my part of log4j.xml file below, Can any one explain me what does that debug="false" mean in first line below? http://jakarta.apache.org/log4j/

Re: AW: AW: Log4j.xml setting for Hibernate not working

2009-11-16 Thread John2000
. November 2009 15:30 > An: log4j-user@logging.apache.org > Betreff: Re: AW: Log4j.xml setting for Hibernate not working > > > Yes I have only log4j.xml. No other file in class path:( And my file is > being taken bcaz it creates hibernate.log file but it remains empty. > > I

AW: AW: Log4j.xml setting for Hibernate not working

2009-11-16 Thread Bender Heri
-logging.jar into your lib and there you go Heri -Ursprüngliche Nachricht- Von: John2000 [mailto:johnk...@gmail.com] Gesendet: Montag, 16. November 2009 15:30 An: log4j-user@logging.apache.org Betreff: Re: AW: Log4j.xml setting for Hibernate not working Yes I have only log4j.xml. No other

Re: AW: Log4j.xml setting for Hibernate not working

2009-11-16 Thread John2000
Yes I have only log4j.xml. No other file in class path:( And my file is being taken bcaz it creates hibernate.log file but it remains empty. I also tried to removing log settings in hibernate.cfg.xml but in no luck. I have these jars in WEB-INF\lib 09/02/2009 08:10 PM62,394

AW: Log4j.xml setting for Hibernate not working

2009-11-16 Thread Bender Heri
] Gesendet: Montag, 16. November 2009 12:57 An: log4j-user@logging.apache.org Betreff: Log4j.xml setting for Hibernate not working We are using log4j.xml for logging. Everything is working fine except hibernet logging. All logs files are crated but for hibernate only log file is created and it

Log4j.xml setting for Hibernate not working

2009-11-16 Thread John2000
We are using log4j.xml for logging. Everything is working fine except hibernet logging. All logs files are crated but for hibernate only log file is created and it remains empty. My log4j.xml settings are

Re: Using System prpoerties inside log4j.xml

2009-08-31 Thread JMan_JE
${..} actually work right away :-) Cheers, Johannes -- View this message in context: http://www.nabble.com/Using-System-prpoerties-inside-log4j.xml-tp25219373p25219405.html Sent from the Log4j - Users mailing list archive at Nabble.com

Using System prpoerties inside log4j.xml

2009-08-31 Thread JMan_JE
Hello, i need to specify the location of a RollingFileAppender's logfiles by a System property. Is there anyway to do system property replacement inside the log4j.xml? I think of something like

Re: multiple apps single log4j.xml

2009-03-23 Thread Jacob Kjome
On 3/23/2009 12:01 AM, ravindra wrote: > Thanks for the reply Jake, > > Let me explain clearly about my configuration. I have placed > log4j.xml file in Tomcat's conf folder and log4j.jar is in lib directory of > Tomcat. And I have another log4j.jar in each of t

RE: multiple apps single log4j.xml

2009-03-22 Thread ravindra
Thanks for the reply Jake, Let me explain clearly about my configuration. I have placed log4j.xml file in Tomcat's conf folder and log4j.jar is in lib directory of Tomcat. And I have another log4j.jar in each of the 3 applications in webapps.In Tomcat's conf directo

Re: multiple apps single log4j.xml

2009-03-22 Thread Jacob Kjome
On 3/22/2009 5:39 AM, ravindra wrote: > Hi Everybody, > > > > I am trying to configure log4j for multiple applications using a single > log4j.xml.I placed log4j.xml in Tomcat's conf directory and placed a > log4j.jar in > > Tomcat's lib directory. It is

multiple apps single log4j.xml

2009-03-22 Thread ravindra
Hi Everybody, I am trying to configure log4j for multiple applications using a single log4j.xml.I placed log4j.xml in Tomcat's conf directory and placed a log4j.jar in Tomcat's lib directory. It is creating the log files, but it is not writing to it. http://jakarta.apache.org/log4j/";>

Re: Problem while loading the log4j.xml in to the classpath

2009-02-27 Thread Jacob Kjome
nfigurator class.I am running my code on the tomcat so I am using code level to set this command line variable.I am using this code in my Listener class . String cmd="java -Dlog4j.configuration=file:///C:/kondal/log4j.xml in.co.netsol.niab.portal.actions.MyContextListener"; //St

Re: Problem while loading the log4j.xml in to the classpath

2009-02-26 Thread kondal rao
Hi Jake, I am not using any custom DOMConfigurator class.I am running my code on the tomcat so I am using code level to set this command line variable.I am using this code in my Listener class . String cmd="java -Dlog4j.configuration=file:///C:/kondal/log4

Re: Problem while loading the log4j.xml in to the classpath

2009-02-26 Thread Jacob Kjome
On Thu, 26 Feb 2009 21:00:48 +0530 kondal rao wrote: Thanks for your reply.I am using sample only.just a spelling mistake. I tried this (file:///C:/samplel/log4j.xml) but it is not working.Any ideas please. You just made the same spelling mistake again. Also, one critical thing I forgot to

Re: Problem while loading the log4j.xml in to the classpath

2009-02-26 Thread kondal rao
Thanks for your reply.I am using sample only.just a spelling mistake. I tried this (file:///C:/samplel/log4j.xml) but it is not working.Any ideas please. Thanks kondal On Thu, Feb 26, 2009 at 8:42 PM, Jacob Kjome wrote: > On Thu, 26 Feb 2009 14:03:43 +0530 > kondal rao wrote: &

Re: Problem while loading the log4j.xml in to the classpath

2009-02-26 Thread Jacob Kjome
On Thu, 26 Feb 2009 14:03:43 +0530 kondal rao wrote: Hi, I am using the log4j for logging in my webapplication.I am keeping the log4j.xml file outside of my web application(generally we will keep under WEB-INF/classes).My problem is my application is not loading the log4j.xml.I am using

Problem while loading the log4j.xml in to the classpath

2009-02-26 Thread kondal rao
Hi, I am using the log4j for logging in my webapplication.I am keeping the log4j.xml file outside of my web application(generally we will keep under WEB-INF/classes).My problem is my application is not loading the log4j.xml.I am using the following code while my context is initializing to

Re: Warning using rollingPolicy in log4j.xml configuration file

2009-02-20 Thread Antonio Angelino
>> >> >> JAR included in buid path: >> >> - log4j-1.2.15.jar >> - apache-log4j-extras-1.0.jar >> >> - commons-logging-1.1.1.jar >> - commons-logging-adapters-1.1.1.jar >> - commons-logging-api-1.1.1.jar >> - and others...

Re: Warning using rollingPolicy in log4j.xml configuration file

2009-02-20 Thread Jacob Kjome
rollingPolicy, this is the warning message: *log4j:WARN Unrecognized element rollingPolicy* JAR included in buid path: - log4j-1.2.15.jar - apache-log4j-extras-1.0.jar - commons-logging-1.1.1.jar - commons-logging-adapters-1.1.1.jar - commons-logging-api-1.1.1.jar - and others... log4j.xml file: http

Warning using rollingPolicy in log4j.xml configuration file

2009-02-20 Thread Antonio Angelino
-1.1.1.jar - commons-logging-api-1.1.1.jar - and others... log4j.xml file: http://jakarta.apache.org/log4j

AW: Load a log4j.xml located within a package - how?

2009-02-10 Thread Linnemann, Gerrit
Users List Betreff: AW: Load a log4j.xml located within a package - how? Maybe there exists indeed a file "C:\Programme\Mozilla Firefox\de\xyz\...\log4j.xml" which is found first by the classloader? Then try getResources() to get an enumeration of all resources found. Or try getSystemRe

AW: Load a log4j.xml located within a package - how?

2009-02-10 Thread Linnemann, Gerrit
Amendment: The enumeration has one entry -> URL looks like this: http://abc.de/example/applet.jar!/de/.../log4j.xml -Ursprüngliche Nachricht- Von: Bender Heri [mailto:hben...@ergonomics.ch] Gesendet: Dienstag, 10. Februar 2009 11:06 An: Log4J Users List Betreff: AW: Load a log4j.

AW: Load a log4j.xml located within a package - how?

2009-02-10 Thread Bender Heri
Maybe there exists indeed a file "C:\Programme\Mozilla Firefox\de\xyz\...\log4j.xml" which is found first by the classloader? Then try getResources() to get an enumeration of all resources found. Or try getSystemResource() of the classloader. Heri -Ursprüngliche Nachrich

Load a log4j.xml located within a package - how?

2009-02-09 Thread Linnemann, Gerrit
Hallo, I'm trying to load a separate config file (log4j.xml) within a jar-File. It is an applet and I want to load a config file located within a package. I tried it like this: URL path2Conf = this.getClass().getClassLoader().getResource("de/xyz/log4j/applets

Re: Setting arbitrary substitution values in log4j.xml?

2008-12-12 Thread Maarten Bosteels
Hello Jakob, I had the same question 10 months ago and found a workaround : http://markmail.org/message/tevhpgptgesqvrgu Maybe it's time to file an enhancement request. Maarten On Fri, Dec 12, 2008 at 1:45 AM, Jakob Homan wrote: > I'm converting our project's log4j.propertie

Setting arbitrary substitution values in log4j.xml?

2008-12-11 Thread Jakob Homan
I'm converting our project's log4j.properties to the log4j.xml in order to take advantage of the automatic rolling compression. Previously, we had lines such as: ourapp.log.dir=. ourapp.log.file= ourapp.log Which were then substituted later on in such lines as log4j.appender

Re: How to get values from log4j.xml file

2008-08-26 Thread Bender Heri
[EMAIL PROTECTED] > Sent: Tuesday, August 26, 2008 5:03 PM > To: Log4J Users List > Subject: [SPAM (Keyword Checking)] - Re: How to get values > from log4j.xml file - Found word(s) XXX in the Text body > > Thanks for the response. When I try it, I get null for > Appender. Any thou

Re: How to get values from log4j.xml file

2008-08-26 Thread Curt Arnold
On Aug 26, 2008, at 10:02 AM, Reza Razavipour wrote: Thanks for the response. When I try it, I get null for Appender. Any thoughts on why? The code is as follows: jboss-log4j.xml has

Re: How to get values from log4j.xml file

2008-08-26 Thread Reza Razavipour
Thanks for the response. When I try it, I get null for Appender. Any thoughts on why? The code is as follows: jboss-log4j.xml has at runtime I have import

RE: How to get values from log4j.xml file

2008-08-26 Thread Bender Heri
Logger.getLogger().getAppender( "SERVER_LOG" ); > -Original Message- > From: Reza Razavipour [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 26, 2008 2:30 AM > To: Log4J Users List > Subject: How to get values from log4j.xml file > > All, >

How to get values from log4j.xml file

2008-08-25 Thread Reza Razavipour
All, I have a log4j.xml file for my application. I have something like the following in the file: /appender> How can I programmatically get the properties for SERVER_LOG appender? Thanks in advance. R

RE: Can custom appender override the log4j.xml configuration

2008-08-22 Thread Michael Erskine
Hi Aneez, > > If you don't want log4j to avoid the default initialization procedure > > you > > can set the log4j.defaultInitOverrride system property to anything other > > than "false". > How does log4j interpret defaultInitOverride?? Does any value other than > 'false' imply true ?? Does 'null'

Re: Can custom appender override the log4j.xml configuration

2008-08-21 Thread Jacob Kjome
- Original Message - From: "Michael Erskine" <[EMAIL PROTECTED]> To: "Log4J Users List" Sent: Tuesday, August 19, 2008 1:49 PM Subject: RE: Can custom appender override the log4j.xml configuration Hi Aneez, I initialise the Logger instance as follows: Logger c

Re: Can custom appender override the log4j.xml configuration

2008-08-21 Thread Aneez Backer
es 'null' also imply true ?? Thanks Aneez - Original Message - From: "Michael Erskine" <[EMAIL PROTECTED]> To: "Log4J Users List" Sent: Tuesday, August 19, 2008 1:49 PM Subject: RE: Can custom appender override the log4j.xml configuration Hi Ane

Re: Can custom appender override the log4j.xml configuration

2008-08-20 Thread Aneez Backer
hi Michael I set the log4j.defaultInitOverrride to true and its works for me Thanks - Original Message - From: "Michael Erskine" <[EMAIL PROTECTED]> To: "Log4J Users List" Sent: Tuesday, August 19, 2008 1:49 PM Subject: RE: Can custom appender override t

RE: Can custom appender override the log4j.xml configuration

2008-08-19 Thread Michael Erskine
Logger > customLogger .addAppender(new JDBCAppenderService(ds)); //ds is the > datasource name How about removing all appenders from the root logger? Or is that not what you want to achieve? Remember that the loggers are hierarchical. > I want customLogger to remained unaffected by the sett

Can custom appender override the log4j.xml configuration

2008-08-18 Thread Aneez Backer
Hi I am writing a custom JDBC appender for log4j for my application. I want this custom appender NOT to be affected in any way by the loggign levels / appenders in the application log4j.xml file. The custom Logger instance has only the one appender (the custom JDBC appender which I wrote

Re: strange behavior of my log4j.xml configuration

2008-08-14 Thread Jacob Kjome
mpt to auto-configure itself upon the first loading of LogManager.class (triggered by any Logger.getLogger("somename") statement).  Usually one would put log4j.xml in the classpath alongside log4j.jar in the same parent classloader so that Log4j can see the configuration, allowing auto-con

Re: strange behavior of my log4j.xml configuration

2008-08-13 Thread lanes
ry." well, that's why other application's configurations also affected after i configure my log4j inside my application. Thanks for your reply. Regards, Lanes --- On Wed, 8/13/08, Jacob Kjome <[EMAIL PROTECTED]> wrote: From: Jacob Kjome <[EMAIL PROTECTED]> Subject:

Re: strange behavior of my log4j.xml configuration

2008-08-13 Thread Jacob Kjome
ve options to use child-first classloading.  However, many times you'll run into other issues because it's not well supported on other platforms. I presume each app is manually configuring iteself?  For appservers like Weblogic of Websphere, I suggest you put both log4j.jar and log4

strange behavior of my log4j.xml configuration

2008-08-13 Thread lanes
Hi All, I got a strange behavior when i deploy my application that define the log4j.xml configuration to existing App.Server (say it IBM WAS v6.1) then other application's log that already use their own log file for example App A log to A.log, App B log to B.log will suddenly redire

Re: How is the log4j.xml file located when running a program using Log4J - no workie

2008-08-11 Thread Thorbjørn Ravn Andersen
CheapLisa skrev den 11-08-2008 21:55: I am not running inside maven (just yet but that is the next step). Right now I want to run inside my IDE. The log4j.xml file needs to be in your classpath to be found. Is it? -- Thorbjørn Ravn Andersen "...

How is the log4j.xml file located when running a program using Log4J - no workie

2008-08-11 Thread CheapLisa
Maven Layout / Log4J / IntelliJ Question I have a test case and the default maven layout /src/test/java/com/test/JDBCLoggerTest.java /src/test/resources/log4j.xml Inside my IDE (IntelliJ) when I compile and run JDBCLoggerTest.java I get: Test is running <= t

RE: log4j.xml

2008-08-07 Thread Scott Deboy
ay, August 06, 2008 9:29 PM To: log4j-user@logging.apache.org Subject: log4j.xml Hi Where I can find my chainsaw log4j.xml file? Where his save my configuration (receivers for example) ? Helena. - To unsubscribe, e-ma

log4j.xml

2008-08-06 Thread Ginzburg Helena
Hi Where I can find my chainsaw log4j.xml file? Where his save my configuration (receivers for example) ? Helena.

Re: Persist dynamic configuration changes to log4j.xml file

2008-07-02 Thread Gopal Patwa
egistered and I'm able to change > configuration at runtime. > > Now my next step is to persist the changes made through JMX to the > log4j.xml configuration file. Is there a utility already written for this > purpose? Or does anyone have an easy way to achieve this. > > Thank yo

Persist dynamic configuration changes to log4j.xml file

2008-06-12 Thread bjacobt
files (MaxIndex), and Log Level). I have a JMX MBean registered and I'm able to change configuration on runtime. Now my next step is to persist the changes made through JMX to the log4j.xml configuration file. Is there a utility already written for this purpose? Or does anyone have an easy way

RE: Simple log4j setup 1) to System.out.println (or eclipse console) or 2) file and 3) enableable at runtime + without need for log4j.xml ?

2008-04-30 Thread Rob Davis-5
Michael - thank you very much - I will try out your suggestion and report back. Your solution to my request to configure without log4j.xml is definitely an option I want to use. Also, just for info, for anyone else out there just starting out with log4j, I've done some more digging and

RE: Simple log4j setup 1) to System.out.println (or eclipse console) or 2) file and 3) enableable at runtime + without need for log4j.xml ?

2008-04-30 Thread Michael Erskine
sableable at runtime - e.g. via a method > Is this possible without using a log4j.xml file ? BasicConfigurator.configure(); ...or call something like the following perhaps from a static block... if (!Logger.getRootLogger().getAllAppenders().hasMoreElements()) { Logger.getR

Simple log4j setup 1) to System.out.println (or eclipse console) or 2) file and 3) enableable at runtime + without need for log4j.xml ?

2008-04-29 Thread Rob Davis-5
ing a log4j.xml file ? Is there a log4j class that I can call methods on directly to set up the above three things? If I do wish to use a log4j.xml then is there an example log4j.xml file I can look at? The links to examples at http://logging.apache.org/log4j/1.2/apidocs/index.html are broken I'v

Re: log4j.xml location issue

2007-09-04 Thread Jacob Kjome
At 12:04 PM 9/4/2007, you wrote: > >Hello, > >I have the files commons-logging.properties, log4j.dtd and log4j.xml >in the root of my eclipse proyect. If I create a jar file with them >inside, all the log works properly. But I don´t want to have that >files inside a jar. >

log4j.xml location issue

2007-09-04 Thread Francisco Exposito Aguilera
Hello, I have the files commons-logging.properties, log4j.dtd and log4j.xml in the root of my eclipse proyect. If I create a jar file with them inside, all the log works properly. But I don´t want to have that files inside a jar. Can anyone tell me how can I modify the place of them? If I

Re: How to add appender dynamically to log4j.xml file

2007-06-19 Thread James Stauffer
Appenders can be added on the fly but there isn't anything that will write the new log4j.xml. You can get the attached appenders from the logger. On 6/19/07, Ashish Gupta <[EMAIL PROTECTED]> wrote: Hi, I'm using log4j in my application for logging purpose. My requirement

How to add appender dynamically to log4j.xml file

2007-06-19 Thread Ashish Gupta
Hi, I'm using log4j in my application for logging purpose. My requirement is to add a new appender on the fly to log4j.xml file persistenlty while the application is running on JBoss Server. I tried with log4j DOMConfigurator.configure() method which loads the log4j.xml file in memor

Re: log4j.xml vs. log4j.properties in Jbuilder 2006

2007-05-18 Thread Jacob Kjome
have imported source code into jbuilder and this source code includes >log4j logging code. I was getting an error from the server saying: > >log4j:WARN No appenders could be found for logger >(org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/WebModule1]). >log4j:WARN Plea

log4j.xml vs. log4j.properties in Jbuilder 2006

2007-05-18 Thread JoeyT
logger (org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/WebModule1]). log4j:WARN Please initialize the log4j system properly. I put the log4j.xml file on the plasspath under WEB-INF/classes where apparently it would work, but it didn't and the same error occurred. I then fou

Re: new wizards to generate log4j.xml files

2007-04-06 Thread dirk ooms
log4j/UsefulCode > > Jake > > At 08:14 AM 4/5/2007, you wrote: > >Hello, > > > >i created 2 new wizards that generate log4j.xml files (logging to file, > >console, socket and email + support for multiple loggers). > > > >for log4j 1.2.x: > >

Re: new wizards to generate log4j.xml files

2007-04-05 Thread Jacob Kjome
? Anyway, here's the UsefulCode link http://wiki.apache.org/logging-log4j/UsefulCode Jake At 08:14 AM 4/5/2007, you wrote: >Hello, > >i created 2 new wizards that generate log4j.xml files (logging to file, >console, socket and email + support for multiple loggers). > >

new wizards to generate log4j.xml files

2007-04-05 Thread dirk ooms
Hello, i created 2 new wizards that generate log4j.xml files (logging to file, console, socket and email + support for multiple loggers). for log4j 1.2.x: http://wizardforge.org/pc?action=showVersion&id=65 for log4j 1.3: http://wizardforge.org/pc?action=showVersion&id=71 enj

Re: Display log4j.xml on jsp

2007-02-27 Thread James Stauffer
You could write a custom appender to grab the logs and then have your JSP grab them from that appender. On 2/27/07, sunil nagavaram <[EMAIL PROTECTED]> wrote: Guys, Did anyone try this, displaying logs generated by log4j on jsp. If so can you please write down the steps for me Thank you -- Suni

RE: Display log4j.xml on jsp

2007-02-27 Thread DECAFFMEYER MATHIEU
To: Log4J Users List Subject: Re: Display log4j.xml on jsp * This message comes from the Internet Network * JSP's can do this! InputStream in = new FileInputStream( "/path/to/my.log" ); // ;-) (Or use a FileReader instead?) On 2/27/07, sunil nagavaram <[EMAIL

Re: Display log4j.xml on jsp

2007-02-27 Thread Julius Davies
JSP's can do this! InputStream in = new FileInputStream( "/path/to/my.log" ); // ;-) (Or use a FileReader instead?) On 2/27/07, sunil nagavaram <[EMAIL PROTECTED]> wrote: Guys, Did anyone try this, displaying logs generated by log4j on jsp. If so can you please write down the steps for me T

Display log4j.xml on jsp

2007-02-27 Thread sunil nagavaram
Guys, Did anyone try this, displaying logs generated by log4j on jsp. If so can you please write down the steps for me Thank you -- Sunil

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

2007-02-24 Thread Jacob Kjome
At 07:29 AM 2/24/2007, you wrote: >hi - i have exactly the same issue: >* i did what you mentioned (1-3) >* yes it copies the log4j.xml to the right place under src/test/ >* BUT the testrunner the complains that it cannot find the file under the >projects root directory (where a

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

2007-02-24 Thread gerold kathan
hi - i have exactly the same issue: * i did what you mentioned (1-3) * yes it copies the log4j.xml to the right place under src/test/ * BUT the testrunner the complains that it cannot find the file under the projects root directory (where also the pom.xml sits) log4j:ERROR Could not parse file

export log4j.xml

2007-02-04 Thread Nathan Coast
Hi, is there any code that exports the log4j.xml for the current runtime log4j configuration? i.e. an xml equivalent to org.apache.log4j.config.PropertyPrinter i've had a look at 1.2.14, is there anything in 1.3 or 2.X? cheers N

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

2007-01-24 Thread Jacob Kjome
Try adding something like the following to your log4j.xml, after the existing entry... You can always create a separate appender for loggers other than "com.company.sql" instead of using the "DBUNIT.DEBUG.LOG" appender for the logger. I think the log4j.xml file

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

2007-01-24 Thread Gallagher, Ron
/test/config 2) Put any resource/configiguration files you want available during tests in that directory. For your situation, you'd put the log4j.xml file in the ${basedir}/src/test/config directory. 3) Add an entry to the build/testResources element in your pom.xml. Here's an example:

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

2007-01-23 Thread Lisa
Jacob Kjome visi.com> writes: > > > 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 Log4

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

2007-01-23 Thread Lisa
James Stauffer gmail.com> writes: > > Try putting the log4j.xml in the working directory and not providing a > path (just the filename). Also run with -Dlog4j.debug to see what > log4j finds. > > Thanks, where do I put -Dlog4j.debug? I put it in the shell script th

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 JU

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

2007-01-23 Thread James Stauffer
Try putting the log4j.xml in the working directory and not providing a path (just the filename). Also run with -Dlog4j.debug to see what log4j finds. On 1/23/07, Lisa <[EMAIL PROTECTED]> wrote: I have written some JUnit tests and put them in the standard layout for test cases under Maven

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

2007-01-23 Thread Lisa
I have written some JUnit tests and put them in the standard layout for test cases under Maven. The tests use log.debug(msg), log.info(msg) etc. The tests run OK. So now I created a simple log4j.xml file with an appender and a logger that filters only the logging messages in my test case (by

Re: Is there a way to reference and env. variable from log4j.xml?

2007-01-15 Thread James Stauffer
Can you change the command line? You could add "-Dlog_root=%log_root%" to copy it to a system property, which should be accessible. On 1/15/07, Reshat Sabiq <[EMAIL PROTECTED]> wrote: I'd like to do smt. like: %LOG_ROOT%/myLog.log ---

  1   2   >