ITN (Babu Easwaramoorthy | 1 May 2006 07:33

RE: DailyRollingFileAppender question

Hi Curt, Jake,

Thanks for your solutions.
My problem is resolved. I was trying to create DailyRollingFileAppender
programmatically.

-Babu

-----Original Message-----
From: Jacob Kjome [mailto:hoju <at> visi.com] 
Sent: Monday, May 01, 2006 2:32 AM
To: Log4J Users List
Subject: Re: DailyRollingFileAppender question

I might be wrong, but I'll bet Babu wasn't considering 
programmatically creating the DailyRollingFileAppender.  Babu, I 
think what you are looking for is using a system property to define 
the file name for the appender.  For instance...

log4j.appender.myRollingAppender.File=/logs/${myRollingAppenderFileName}

If your configuration code, make sure you set the system property 
"myRollingAppenderFileName" before you call one of the configure() 
methods.  Or, just add something like 
"-DmyRollingAppenderFileName=someFileName.log" to the command line 
where you start your java program.  In the latter case, you can use 
Log4j auto-configuration rather than having to call configure()
manually.

Jake
(Continue reading)

Bender Heri | 2 May 2006 09:55
Picon
Favicon

RE: ObjectRenderer

Your output looks like the default toString() result. So I guess your renderer is not called.

How looks your definition? This definition works for me:

    <renderer renderedClass="ch.ergonomics.pms.common.supervision.MessageLogger"
        renderingClass="ch.ergonomics.pms.common.supervision.MessageLogger"/>

Make sure that your config file is loaded.

Heri

> -----Original Message-----
> From: Steve Pruitt [mailto:SPruitt <at> exstream.com]
> Sent: Thursday, April 27, 2006 11:18 PM
> To: Log4J Users List
> Subject: ObjectRenderer
> 
> 
> Has anyone had luck getting object renderers to work?  I have 
> a renderer
> that implements doRender and returns a string.  Both, the 
> rendered class
> and rendering class are defined in my config file with a <render> tag.
> 
> I have a sysout in the doRender method, but I never see its println in
> the console.  So, I don't think its being called.
> The log message is:
> 
> 	admin.rendering.ComponentMessage <at> 8491b8
> 
(Continue reading)

Rafal Markut | 2 May 2006 10:07
Picon

Re: Log4j doesn't create log files

Hello,

in other projects I didn't have to define it. It worked without any problems 
(e.g. on my windows).

with best regards,
Rafal

----- Original Message ----- 
From: "Jacob Kjome" <hoju <at> visi.com>
To: "Log4J Users List" <log4j-user <at> logging.apache.org>
Sent: Friday, April 28, 2006 5:02 PM
Subject: Re: Log4j doesn't create log files

>
> Where did you expect the "applicationRoot" variable to come from?  If you 
> don't
> set it either within the properties file or as a Java system variable, 
> then why
> do you expect it to exist?
>
> Jake
>
> Quoting Rafal Markut <rafal.markut <at> mediawave.de>:
>
>> Hi,
>>
>> I solved my problem.
>>
>> I had: log4j.appender.*.file=${applicationRoot}/logs/*.log
(Continue reading)

Evans, Jess | 2 May 2006 16:42
Favicon

quiet writer throws runtime exception

Hello all,

I'm receiving these errors in our production system.  We have two app.
server instances running in a cluster.  It seems to occur some nights
after midnight, which suggests an issue with rolling.  It occurs
randomly and on one instance only.  Once it starts, every call to log4j
in that container fails with an identical error.

I believe someone stated that log4j doesn't support multiple JVMs
interleaving to a single log file.  Is this correct?  If so, what is the
suggested configuration to allow clustered application server instances
to log to individual files (without having to support a distinct log4j
configuration per instance).

Should the "Quiet" writer be catching these sorts of exceptions rather
than bubbling them up?

Regards,

-Jess

<pno-01> <ExecuteThread: '36' for queue: 'weblogic.kernel.Default'>
<<anonymou
s>> <BEA1-5265D32E7149> <BEA-010051> <EJB Exception occurred during
invocation f
rom home:
org.collegeboard.k12.pno.ordering.persistence.AIPersistence_qqqwie_Hom
eImpl <at> 4e93752 threw exception: java.lang.IllegalStateException: Current
state =
FLUSHED, new state = CODING
(Continue reading)

James Stauffer | 2 May 2006 17:07
Picon

Re: Log4j doesn't create log files

Maybe your container defines it.

On 5/2/06, Rafal Markut <rafal.markut <at> mediawave.de> wrote:
> Hello,
>
> in other projects I didn't have to define it. It worked without any problems
> (e.g. on my windows).
>
> with best regards,
> Rafal
>
> ----- Original Message -----
> From: "Jacob Kjome" <hoju <at> visi.com>
> To: "Log4J Users List" <log4j-user <at> logging.apache.org>
> Sent: Friday, April 28, 2006 5:02 PM
> Subject: Re: Log4j doesn't create log files
>
>
> >
> > Where did you expect the "applicationRoot" variable to come from?  If you
> > don't
> > set it either within the properties file or as a Java system variable,
> > then why
> > do you expect it to exist?
> >
> > Jake
> >
> > Quoting Rafal Markut <rafal.markut <at> mediawave.de>:
> >
> >> Hi,
(Continue reading)

James Stauffer | 2 May 2006 17:09
Picon

Re: quiet writer throws runtime exception

Write to something the works with multiple servers (database, queue,
socket, etc) or write to a file that is dictinct on each server.

On 5/2/06, Evans, Jess <JEvans <at> collegeboard.org> wrote:
> Hello all,
>
> I'm receiving these errors in our production system.  We have two app.
> server instances running in a cluster.  It seems to occur some nights
> after midnight, which suggests an issue with rolling.  It occurs
> randomly and on one instance only.  Once it starts, every call to log4j
> in that container fails with an identical error.
>
> I believe someone stated that log4j doesn't support multiple JVMs
> interleaving to a single log file.  Is this correct?  If so, what is the
> suggested configuration to allow clustered application server instances
> to log to individual files (without having to support a distinct log4j
> configuration per instance).

--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/
Jacob Kjome | 2 May 2006 17:09
Favicon

Re: Log4j doesn't create log files

Quoting Rafal Markut <rafal.markut <at> mediawave.de>:

> Hello,
>
> in other projects I didn't have to define it. It worked without any problems
> (e.g. on my windows).
>

Well, in order to exist and be resolved to some defined location, it had to be
defined somewhere.  Maybe you were not aware of it being defined by some script
starting up the JVM or some code settting the property upon application startup,
but it had to be set... unless we're talking emaculate conception here.  If so,
please show me how to get that feature.  I want to use it in my next
application :-)

Jake

> with best regards,
> Rafal
>
> ----- Original Message -----
> From: "Jacob Kjome" <hoju <at> visi.com>
> To: "Log4J Users List" <log4j-user <at> logging.apache.org>
> Sent: Friday, April 28, 2006 5:02 PM
> Subject: Re: Log4j doesn't create log files
>
>
> >
> > Where did you expect the "applicationRoot" variable to come from?  If you
> > don't
(Continue reading)

Evans, Jess | 2 May 2006 18:29
Favicon

RE: quiet writer throws runtime exception

So files officially are not supported for interleaving logging?  I'm
trying to check the FAQs, but the log4j site seems to be down.  I've
been running in this setup for over a year and never ran into any issues
until recently.  What is the underlying reason for not supporting this
functionality?  Does this only afflict the rolling appender?

-----Original Message-----
From: James Stauffer [mailto:stauffer.james <at> gmail.com] 
Sent: Tuesday, May 02, 2006 11:09 AM
To: Log4J Users List
Subject: Re: quiet writer throws runtime exception

Write to something the works with multiple servers (database, queue,
socket, etc) or write to a file that is dictinct on each server.

On 5/2/06, Evans, Jess <JEvans <at> collegeboard.org> wrote:
> Hello all,
>
> I'm receiving these errors in our production system.  We have two app.
> server instances running in a cluster.  It seems to occur some nights
> after midnight, which suggests an issue with rolling.  It occurs
> randomly and on one instance only.  Once it starts, every call to
log4j
> in that container fails with an identical error.
>
> I believe someone stated that log4j doesn't support multiple JVMs
> interleaving to a single log file.  Is this correct?  If so, what is
the
> suggested configuration to allow clustered application server
instances
(Continue reading)

James Stauffer | 2 May 2006 18:38
Picon

Re: quiet writer throws runtime exception

That is correct.
I believe the reason has to do with it being difficult for two
processes to correctly interleave writes -- especially with buffers
and multi-line messages.
It affects all file appenders.

On 5/2/06, Evans, Jess <JEvans <at> collegeboard.org> wrote:
> So files officially are not supported for interleaving logging?  I'm
> trying to check the FAQs, but the log4j site seems to be down.  I've
> been running in this setup for over a year and never ran into any issues
> until recently.  What is the underlying reason for not supporting this
> functionality?  Does this only afflict the rolling appender?
>
> -----Original Message-----
> From: James Stauffer [mailto:stauffer.james <at> gmail.com]
> Sent: Tuesday, May 02, 2006 11:09 AM
> To: Log4J Users List
> Subject: Re: quiet writer throws runtime exception
>
> Write to something the works with multiple servers (database, queue,
> socket, etc) or write to a file that is dictinct on each server.
>
> On 5/2/06, Evans, Jess <JEvans <at> collegeboard.org> wrote:
> > Hello all,
> >
> > I'm receiving these errors in our production system.  We have two app.
> > server instances running in a cluster.  It seems to occur some nights
> > after midnight, which suggests an issue with rolling.  It occurs
> > randomly and on one instance only.  Once it starts, every call to
> log4j
(Continue reading)

David.Hodgman | 3 May 2006 01:37
Picon
Favicon

Re: Configuring log4j under wsad


Whoever set up the framework of the app I'm working on did so using Commons
Logging pointing at Log4j.  The problem is, I can't configure Log4j
properly unless I set the classloader mode as PARENT_LAST under WAS.  It
looks like WAS's own copy of Commons Logging is not finding our
commons-logging.properties file and is falling back to default behaviour.
Is there a way to fix this without changing the classloader mode?

TIA,

 David Hodgman                                                              
 Senior Consultant, Consulting & Project Management                         
 National Australia Bank                                                    

 Level 7, 500 Bourke St, Melbourne VIC 3000                                 
 Tel: (03) 8641 4169 (6)  |  Fax: (03) 8641 2856 (6)  |  Mob: 0405 357 754  
 Email: David.Hodgman <at> nab.com.au                                            

National Australia Bank Limited - ACN 004 044 937
This email may contain confidential information. If you are not the intended recipient, please
immediately notify us at postmaster <at> nab.com.au or by replying to the sender, and then destroy all copies
of this email. Except where this email indicates otherwise, views expressed in this email are those of the
sender and not of National Australia Bank Limited. Advice in this email does not take account of your
objectives, financial situation, or needs. It is important for you to consider these matters and, if the
e-mail refers to a product(s), you should read the relevant Product Disclosure Statement(s)/other
disclosure document(s) before making any decisions. If you do not want email marketing from us in future,
forward this email with "unsubscribe" in the subject line to Unsubscribe <at> nab.com.au in order to stop
marketing emails from this sender. National Australia Bank Limited does not repre
 sent that this email is free of errors, viruses or interference
(Continue reading)


Gmane