Re: dynamic variables/parameters

2008-02-15 Thread Jacob Kjome
On Fri, 15 Feb 2008 09:05:55 +0100 "Maarten Bosteels" <[EMAIL PROTECTED]> wrote: On Thu, Feb 14, 2008 at 10:02 PM, Jacob Kjome <[EMAIL PROTECTED]> wrote: On Thu, 14 Feb 2008 17:49:57 +0100 "Maarten Bosteels" <[EMAIL PROTECTED]> wrote: > On Thu, Feb 14, 2008 at 3:13 PM, James A. N. Stauffer <

Re: Can't figure out how to log to separate files in Log4J -- Need Ideas

2008-02-15 Thread James A. N. Stauffer
There have been discussions on the list of an appender that creates a different file per value of an MDC key. I think it was in relation to separate files per thread but you could set the MDC key separately in each app and then use that appender. On Fri, Feb 15, 2008 at 7:45 AM, sparky2708 <[EMAI

JNDI Repository Selector - What to do when JNDI is not available as a result of J2EE specifications.

2008-02-15 Thread Schneeberger, Travis
Hello all, I have been doing some research and testing on potential log4j configurations to use in our J2EE environment. We have decided that the best solution that fits our environment is a Repository Selector. We would like to use a JNDI selector do to the advantages that JNDI provides.

Re: Roll a Log File on restart of an App run

2008-02-15 Thread James A. N. Stauffer
I wrote an appender that I think could do that. If the "separate" isn't set then it will create a file only once per run. http://stauffer.james.googlepages.com/DateFormatFileAppender.java On Fri, Feb 15, 2008 at 10:57 AM, Jim Reilly <[EMAIL PROTECTED]> wrote: > > Per each restart of an app, I wo

Roll a Log File on restart of an App run

2008-02-15 Thread Jim Reilly
Per each restart of an app, I would like to have the ability to have the log files roll (like the RollingFileAppender), so each new run has its own log file run. Is there are my to do this via the log4j config file or another file appender? I could see how that might be difficult to do or pro

Re: Can't figure out how to log to separate files in Log4J -- Need Ideas

2008-02-15 Thread sparky2708
Maarten, I ALMOST went down this path yesterday. Was thinking along those lines too but figured there might be some more elegant way to do it... Maarten Bosteels wrote: > > Or, you can use placeholders in your config file. > > log4j.appender.RollingFile.File = /var/log/${application}.log >

Re: Can't figure out how to log to separate files in Log4J -- Need Ideas

2008-02-15 Thread sparky2708
Interesting idea but I can't separate based on log levels. In each application I want to log all the log levels to the same log file. I was thinking of maybe using NDC but I don't think that would very well either. Thanks for the help. orko wrote: > > Hi there, > You can create multiple append

Re: Can't figure out how to log to separate files in Log4J -- Need Ideas

2008-02-15 Thread Maarten Bosteels
Or, you can use placeholders in your config file. log4j.appender.RollingFile.File = /var/log/${application}.log and each application can then use a different value for the system property: app1: System.setPropert("application", "app1") or java -Dapplication=app1 ... app2: System.setPropert("a

Re: Can't figure out how to log to separate files in Log4J -- Need Ideas

2008-02-15 Thread orko
Hi there, You can create multiple appenders in the same configuration file. Suppose you want 4 log files, and all DailyRollingFileAppender, all you need to is create 4 appenders (it is exactly same as creating one appender), then point them to diff files based on log levels. You can control appl

Can't figure out how to log to separate files in Log4J -- Need Ideas

2008-02-15 Thread sparky2708
I have a system developed in java that has multiple services (i.e. java Applications). I would like to be able to log EACH application to ITS OWN log file. I have about 50-80 applications so having a log4j.properties for each one is not a feasible solution. I would like to use ONE log4j.proper

Re: dynamic variables/parameters

2008-02-15 Thread Maarten Bosteels
On Thu, Feb 14, 2008 at 10:02 PM, Jacob Kjome <[EMAIL PROTECTED]> wrote: > On Thu, 14 Feb 2008 17:49:57 +0100 > "Maarten Bosteels" <[EMAIL PROTECTED]> wrote: > > On Thu, Feb 14, 2008 at 3:13 PM, James A. N. Stauffer < > > [EMAIL PROTECTED]> wrote: > > > >> In an XML config, system properties can