Debuging Log4j to find which file log is being written to

2009-06-22 Thread Ashish Kulkarni
HiI wanted to find out which file the log file is written to, so i added debug="true" in my xml file as below http://jakarta.apache.org/log4j/"; debug="true"> This shows me that a log file is created under /app/mylogs/log But no logs are being written to this log file, i can see all the logs onl

Re: How to find which log file the log is being written

2009-06-02 Thread Ashish Kulkarni
HiHow do i set log4j.debug=true in XML configuration file On Tue, Jun 2, 2009 at 10:55 AM, Ashish Kulkarni < ashish.kulkarn...@gmail.com> wrote: > HiWhere do i set this log4j.debug =true, and where would be it print the > debug message > > > On Tue, Jun 2, 2009 at 10:09

Re: How to find which log file the log is being written

2009-06-02 Thread Ashish Kulkarni
HiWhere do i set this log4j.debug =true, and where would be it print the debug message On Tue, Jun 2, 2009 at 10:09 AM, Yair Ogen wrote: > use log4j.debug=true > > On Tue, Jun 2, 2009 at 5:00 PM, Ashish Kulkarni < > ashish.kulkarn...@gmail.com > > wrote: > > > Hi

How to find which log file the log is being written

2009-06-02 Thread Ashish Kulkarni
HiI have an application which is installed in clustered weblogic environment, and for some reason i do not see any logs in the log file specified in File section I have defined my logger as below, i dont see any log file in my log4jxml.xml file, but only in weblogic log file, how do i find out what

logging issue in application installed on clustered Weblogic Server

2009-05-04 Thread Ashish Kulkarni
HiWe have any application which is installed on a clustered Weblogic server, there are 3 clusters on which this application is installed, All the logs written by startup servlet are written to both A1 and STDOUT appender, but then once the application is running logs are written to STDOUT only Ho

Logging issue with logginf to seperate log files

2009-02-23 Thread Ashish Kulkarni
HiI have a web application where the class structure is as below com.test.myproject.common I have a class under package common, i want to print all the logs from this log file to a separate log file, so i defined log4j.xml file as below. For some reason all the logs are logged in log4jXml.xml an

difference between using properties file and XML file to loading log4j preferences

2009-02-10 Thread Ashish Kulkarni
HiWhat is the difference between loading properties file and XML file to load logj4 preference, is there any advantages or disadvantages of doing so?

Find log file name and appender in Java Program

2009-01-30 Thread Ashish Kulkarni
HiI need to find out the log file name, and path in Java program, I tried logger.getAppender("A1").getName() and also Enumeration enu = Logger.getRootLogger().getAllAppenders(); I need to retrieve /app/logs/mylog/log4jXml.xml in my java program But is it not returning the appender, my log4j.xm

Initialize log4j properties file from database,

2009-01-28 Thread Ashish Kulkarni
HiNormally i load log4j from properties file or XML file, If i have properties file i initialize using PropertyConfigurator, or if XML file initialize using DOMConfigurator. Can i possible load these properties from a database? Also can i log messages to a database? Ashish

View Log4J xml log files

2008-12-23 Thread Ashish Kulkarni
HiI have been using ChainSaw to view XML log files created by log4j, is there any other way of view XML logs, this application is a bit pain, it does not automatically update log files, also when i open second log files, it simply appends the logs instead of closing the first log file and opening t

Logging messages using java 1.5 format string

2008-08-04 Thread Ashish Kulkarni
Hi Is there anyway to format the log messages using java 1.5 format capabilities for example i can have a nice formatted out put using System.out.format("Number of Users on Registry %1$s, is %2$d", registry.getName(), userSet.size()); Can i do some thing like logger.debug("Number of Users on Regis

Re: Location of Log4J file in web application

2007-10-09 Thread Ashish Kulkarni
> (or server-specific descriptor, such as context.xml in Tomcat). By > default, the path would be in a "logs" directory under the WEB-INF > directory of your webapp (assuming it is deployed as an exploded archive). > > Please read the Javadoc I pointed to previously for an expl

Re: Location of Log4J file in web application

2007-10-08 Thread Ashish Kulkarni
> wrote: > > I use Tomcat and I can set system properties. I would be very > > surprise if you can't set system properties on WebLogic. This might > > not work if you aren't given the rights to set system properties. > > > > On 10/4/07, Ashish Kulkarni &

Re: Location of Log4J file in web application

2007-10-04 Thread Ashish Kulkarni
machine run java with -Dlog4jXmlFilter=C:/Documents and > Settings/Kulkara/My > > Documents/ashish/code/workspace5.1M/version6300build12-00/log4jXmlFilter.log > > On 10/4/07, Ashish Kulkarni <[EMAIL PROTECTED]> wrote: > > Hi > > How do we set the log file locati

Location of Log4J file in web application

2007-10-04 Thread Ashish Kulkarni
Hi How do we set the log file location dyanamically in web application, Currently i am using log4j.xml file with following definiation, this file is under WEB-INF file ... and in load the this xml file in Servlet using String fileName = config.getInitParameter(log4j.xml); ServletContext oCtx = c

Re: Question about logging to multiple files

2007-08-23 Thread Ashish Kulkarni
ld <[EMAIL PROTECTED]> wrote: > > > On Aug 23, 2007, at 3:24 PM, Ashish Kulkarni wrote: > > > Hi > > I am using XML to define my logging properties, > > I wanted to know if i can define 2 log files, and have logs in them > > depending on which class is writin

Re: Question about logging to multiple files

2007-08-23 Thread Ashish Kulkarni
#x27;t go to the A1 appender. > > On 8/23/07, Ashish Kulkarni <[EMAIL PROTECTED]> wrote: > > Hi > > I am using XML to define my logging properties, > > I wanted to know if i can define 2 log files, and have logs in them > > depending on which class is writing log fi

Question about logging to multiple files

2007-08-23 Thread Ashish Kulkarni
Hi I am using XML to define my logging properties, I wanted to know if i can define 2 log files, and have logs in them depending on which class is writing log file for example if the package is com.test.me then the logs should be written to mylog.xml file if the class is com.test.me.my.Test then

file parameter in XML configuration file

2004-12-08 Thread Ashish Kulkarni
Hi I am using log4j in my web application, i use DOMConfigurator to configure the log4j properties, i have a initialization servlet which has the following command DOMConfigurator.configure(path); where path is path to configuration.xml file, in this configuration.xml file i have file parameter w