Question

2003-02-02 Thread sk k
Hi, Is there anyway to source values from an external xml file(foo.xml) into log4j.xml properties file. Incase it is possible, how to do it? Thanks. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.c

Re: DOMConfigurator issues

2003-01-31 Thread sk k
Yes it is indeed working. I am not sure why it didn't work when I was testing. Thanks for replying back.Anyway, I have another problem wherenin I need to put the logdir value in an xml file and source it into log4j.xml rather than get it from -D option.Eg:- I have two files log4j.xml and test.xm

Re: Logging multiple strings

2003-01-30 Thread sk k
I will also need such a jdbc appender since we have to audit req/response messages along with certian user info into a database. It would be great if such a pattern mechansim is added so that it will be easy to retieve the values and store them into a database. --- [EMAIL PROTECTED] wrote: >

DOMConfigurator issues

2003-01-30 Thread sk k
Hi, I am having problem writing a xml config file for log4j. Like I need to subsitute -D option values into xml config file. Eg: java -Dlogdir=C:/java TestLogger Substituting the logdir value into log4j.xml as shown below(shown by an arrow). log4j.xml - <---

RE: Antw: Problems with log4j properties loading

2002-10-23 Thread sk k
Yes it works if you use "file:" in front of absoulte path but is there anyway to specify relative path on UNIX like on Windows "file:./tmp/log.xml" etc. Thanks. --- Frank-Olaf Lohmann <[EMAIL PROTECTED]> wrote: > Hi, > > I am not familiar with the specials at the Solaris > machine. But are y

RE: Antw: Problems with log4j properties loading

2002-10-23 Thread sk k
ystem properly --- --- "Pomytkin, Sergey" <[EMAIL PROTECTED]> wrote: > Try absolute path > > -Original Message- > From: sk k [mailto:skk7963@;yahoo.com] > Sent: Tuesday, October 22, 2002 13:41 > To: Log4J Users List > Subject: Re: Antw

Re: ConsoleAppender and System.{out,err}.println

2002-10-22 Thread sk k
If want to distinguish log4j msgs form u'r system.out's then you can use some pattern with timestamp or className.method. This way there will be a difference. Also, since log4j has levels, you may be able to distinguish based on it. --- Daniel Serodio <[EMAIL PROTECTED]> wrote: > I'm maintainin

Re: Antw: Problems with log4j properties loading

2002-10-22 Thread sk k
org.apache.log4j.Logger.getRootLogger(Logger.java:104) .. Anybody know the reason and a workaround. --- sk k <[EMAIL PROTECTED]> wrote: > > Thank you It solved the problem. > > > --- Frank-Olaf Lohmann <[EMAIL PROTECTED]> wrote: > &g

Re: Antw: Problems with log4j properties loading

2002-10-22 Thread sk k
Thank you It solved the problem. --- Frank-Olaf Lohmann <[EMAIL PROTECTED]> wrote: > Hi, > > use a URL for the file name, e.g. > -Dlog4j.configuration=file:./log4j.xml > > Regards > Frank-Olaf Lohmann > > > > -- > To unsubscribe, e-mail: >

Problems with log4j properties loading

2002-10-22 Thread sk k
Hi, The log4j Configurator is not able to find my config file for some reason. Don't know why?. Here is the commandline java -classpath C:\log4j\log4j-1.2.6.jar;.;%CLASSPATH% -Dlog4j.debug=true -Dlog4j.configuration=..\tmp\CustomLog4j.xml Test1 I have both tmp dir and CustomLog4j.xml file so

Re: get filename

2002-10-18 Thread sk k
Yes you can. Get the reference to the FileAppender and call getFile(). This should return the name of the file the log msgs are being written to. Sample code: --- Appender appender = logger.getAppender(""); if (appender instanceof FileAppender) { FileAppender app = (FileAp

Re: Newbie help

2002-10-11 Thread sk k
Here is the link for some sample tutorials/documentation on how to setup log4j and different features. http://jakarta.apache.org/log4j/docs/documentation.html Also, here is a sample too --- #Root log4j.rootCategory=DEBUG,dest1 #Category1 log4j.category.TestLogger1=INFO,

Re: Newbie help

2002-10-11 Thread sk k
Here is the link for some sample tutorials/documentation on how to setup log4j and different features. http://jakarta.apache.org/log4j/docs/documentation.html Also, here is a sample too --- #Root log4j.rootCategory=DEBUG,dest1 #Category1 log4j.category.TestLogger1=INFO,

Re: Finding Appenders

2002-10-10 Thread sk k
About JMX: I was able to get both RI from Sun and MX4j server up and running using the JMX capablities exposed by log4j. Since, MX4j is actively developed and maintained, you can take a look at it. It has some bugs but it seems to get the work done at least for me since, I wanted some s

Re: Release of log4j 1.2.7

2002-10-10 Thread sk k
Thanks for the reply. --- Ceki Gülcü <[EMAIL PROTECTED]> wrote: > > Subclassing the Logger class is highly discouraged. > You should try wrapping > instead of subclassing. > > At 18:54 09.10.2002 -0700, you wrote: > > >Can you pls add the functionality to the next > release > >to allow DOMCo

Re: LevelMatchFilter ???

2002-10-09 Thread sk k
IMHO, there is no way to exclude some random log levels using txt prop files but you can do that using xml config files. Here is the sample that needs to be enclosed within an appender tag. --- NickPhilia Nguyen <[EMAIL PROTECTED]> wrote: > It seems that I ca

Re: Release of log4j 1.2.7

2002-10-09 Thread sk k
Can you pls add the functionality to the next release to allow DOMConfigurator to recognize the categoryFactory tag, so that extending log4j to support other levels can be easy. It seems that only PropertyConfigurator supports the proper extension of levels without throwing ClassCastException.

Re: Disable Struts debug messages

2002-10-08 Thread sk k
Try this. It should do the trick. --- "Parmar, Dipakkumar" <[EMAIL PROTECTED]> wrote: > Hello, > > I just converted my log4j property file to XML. Now > I don't know how to > disable struts debug messages. > > In property file I used to do > "log4j.logger.org.apache.struts=ERROR" b

Re: XML Config file

2002-10-08 Thread sk k
Anybody know what the problem is. Is it a known bug or do I need to file a bug report. Pls let me know Thanks --- sk k <[EMAIL PROTECTED]> wrote: > > Hi, > > I am trying to run the MyLoggerTest.java file under > examples dir which shows the extension of log4j to >

XML Config file

2002-10-06 Thread sk k
Hi, I am trying to run the MyLoggerTest.java file under examples dir which shows the extension of log4j to support other levels and am getting the following error. >>> log4j:ERROR Did you forget to set the factory in the config file? java.lang.ClassCastException: org.apache.log4j.Logger

Re: How to exclude a particular LOG level from the output?

2002-10-03 Thread sk k
IMHO, If you are using text prop files then there is no way to do that except for changing the code for your purpose. But, if you switch to xml config files then there is LevelRangeFilter which will allow you turn off only one level i.e ERROR in your case. --- NickPhilia Nguyen <[EMAIL PROTECT

RE: Extending Log4j

2002-10-01 Thread sk k
esn't throw the above error. Any thoughts? Thanks. --- "Lu, David" <[EMAIL PROTECTED]> wrote: > Hi, > > Can you point me to the examples you are using to > extend the number of > priority levels? > > David > > -Original Message- &g

Extending Log4j

2002-10-01 Thread sk k
Hi, I am trying to extends log4j to provide custom logging levels like TRACE etc. I have gone through the examples which shows the extension mechanism and I have implemented based on the samples but my question is - How do you add filters to pickup new logging levels ( TRACE, AUDIT etc) or what

RE: Appenders

2002-10-01 Thread sk k
want > to > accomplish these things but haven't been able to > find > out how. Could you point me to where you found info > about this? I would really appreciate it!! > > /Johannes > > --- sk k <[EMAIL PROTECTED]> skrev: > > > Hi, > > > &

RE: Appenders

2002-09-29 Thread sk k
Hi, Thanks for the replies. I did find some more info about the logging filters and it seems that it can satisfy my requirements but the only downside is, one needs to use xml config files, which we don't do. So my question: is there any effort to add this feature to log4j for usage with ordin

Appenders

2002-09-27 Thread sk k
Hi, Is there anyway we can send each log level to a separate file. Example: For a category X, having D,I as destinations. Is there a way to say that only Debug level messages go to destination D which logs into debug.log and Info level messages go to destination I which logs to info.log Thanks

RE: unformatted printing in log4j?

2002-09-11 Thread sk k
It seems that you may need to make a couple of changes to log4j source code to acheive u'r objective. Sample Hack === - Extend the Logger class or add a new overloaded debug method to category class and have a boolean or some indicator so that u know that it is from printRaw fn. Now thi

Re: dailyrollingfileappender cannot rollover when application is not running.

2002-09-05 Thread sk k
If your application doesn't run at midnight, then when it startups the next day, log4j will check if there is any file with previous date(for u'r case) and roll it over. Any new messages will go to the new file. I tested it with minutes extension and it worked as mentioned above. But if doesn't

RE: Performance between Log4j and custom in-house logger

2002-09-04 Thread sk k
; > AsyncAppender can only be created from config > files > > > using the XML config. > > > Or you can do it programatically for your tests. > > > > > > See > > > > >http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/AsyncAppender.ht

RE: Performance between Log4j and custom in-house logger

2002-09-04 Thread sk k
he > chronological order in which those events were > created. To this end, it > uses a bounded buffer as the "queue" for these > events. This slows > performance in simple, non-intensive apps; however > it does ensure delivery > of the logging events in the corr

Re: JMX

2002-09-04 Thread sk k
Log4j has pretty decent facilities to manage the logging pieces like changing logging levels, changing logging format, appenders etc. As u said, it is still in nascent stage and I also remember Ceki posting a request for developers to enhance JMX. I am currently testing log4j integration wi

Re: Performance between Log4j and custom in-house logger

2002-09-03 Thread sk k
Hi, Any thoughts on how I can improve the performance numbers for logging. Thanks. --- Ceki Gülcü <[EMAIL PROTECTED]> wrote: > > What is the difference between Strings, taking the > values 2,4 and 8, > and Request, taking the values 100, 1000 and 2000? > > Are you sure you are waiting for

RE: Performance between Log4j and custom in-house logger

2002-09-03 Thread sk k
ht Ceki? ;) > However, having used log4j in numerous apps from > very small to very > large, we've never had any complaints about its > performance. There was > always a lot of tuning to be done on our own apps > before logging > performance showed up as a blip on t

Re: Performance between Log4j and custom in-house logger

2002-09-03 Thread sk k
Hi, We want to move to log4j and that is the reason why we are doing the POC. I really like log4j(features and functionality ) and wanted to push the usage of log4j in the entire organization. I need some input from guru's to see how I can improve the performance numbers since the decision is

Performance between Log4j and custom in-house logger

2002-09-03 Thread sk k
Hi, We are planning to move from a custom in house logging framework (MyLogger) to using Log4j and have been doing some performance comparison between log4j and MyLogger. The numbers seem to be favoring mylogger over log4j. Sample Numbers == Note: Timing includes logj startup time,