Cláudia Miazaki | 1 Jul 19:07 2004
Picon

Watchdog for JoranConfigurator

Hi,

Does anybody know if log4j-1.3alpha's JoranConfigurator has either a method
similar to configureAndWatch() or a Watchdog? If a watchdog is available,
where can I find any documentation about how to use it? As I could not find
it, I had to go back to DOMConfigurator to parse a XML configuration file
with its configureAndWatch().

Regards,
Claudia Miazaki
Allistair Crossley | 2 Jul 16:23 2004

RE: log4j:ERROR Failed to rename : more info

Hey there,

Sorry it took so long to reply Ceki.

The suggested fix in this bug report only monitors the result of the rename. It does not fix the problem where
a new file is required _for sure_ at a certain time.

Another issue with this suggested fix is that it will not compile because

this.setFile(filename, true)

is not a method of RollingFileAppender. The method specification in that is

setFile(String, boolean, boolean, int)

And I am not au fait enough with Log4J to know what those arguments mean. Perhaps you could suggest?

Many thanks. I see this is an open bug and I hope it will be resolved at some point.

Cheers!

Allistair Crossley
______________________

Senior Web Developer
New Media Group, QAS Ltd
Telephone: 020 7819 5343
__________________________

> -----Original Message-----
(Continue reading)

pwomack | 2 Jul 17:19 2004
Picon

RSS as a log message viewing/distribution mechanism?

I'm an enthusiastic user of Log4j. I've never learnt
that much about the real complexities, since I've
never needed to; the basic concepts work well
for me.

It has occurred to me that creating an appender
that is an RSS feed would be "interesting"

disclaimer: I don't know nuch about RSS either.

RSS is widely used to dissmenate, aggregate,
and browse semi-real-time information deemed
to be of "interest" to the user.

This would seem to fit well with infrequent
"high level" error log messages (e.g. at
ERROR or FATAL level).

So to the questions:
1) *IS* RSS an interesting mechanism to manipulate
    log messages with?

2) If the answer to (1) is yes, has anyone done it?

      BugBear
Jim Moore | 3 Jul 15:15 2004
Picon

Re: RSS as a log message viewing/distribution mechanism?

Having an RSS/RDF/Atom feed would be nice, since it would let you gather
information from your servers and the like into the same place as all the
rest of your information.  The more we can do to consolidate where our
important information is, the better.

However, an RSS appender would directly have limited value, I think.  A
transformer (eg, XSLT) for converting Log4j's "native" xml to RSS/RDF/Atom
would be pretty cool.  Another advantage of transformation over an appender
is that you can filter & transform as needed; for example, from the same log
file you can have an RSS feed of ERROR messages that links to an HTML page
with the full context of all the DEBUG - FATAL messages.

As for #2:  Not that I know of. :-)

-Jim Moore

----- Original Message ----- 
From: "pwomack" <pwomack <at> papermule.co.uk>
To: <log4j-user <at> logging.apache.org>
Sent: Friday, July 02, 2004 11:19 AM
Subject: RSS as a log message viewing/distribution mechanism?

> I'm an enthusiastic user of Log4j. I've never learnt
> that much about the real complexities, since I've
> never needed to; the basic concepts work well
> for me.
>
> It has occurred to me that creating an appender
> that is an RSS feed would be "interesting"
>
(Continue reading)

Elie Wildman | 5 Jul 14:32 2004

log4j:ERROR Attempted to append to closed appender named [system]

During load testing we are seeing the following error appear from time to 
time:

log4j:ERROR Attempted to append to closed appender named [system]

We are using Orion app server.

We have a grinder script which runs a load test on our application.  This 
error does not seem to appear during regular  use.

When I turned on debugging, I noticed some strange behavoir in the output. 
Basically, I could watch the config file be parsed. Upon completion 
"Finished configuring" would appear. However sometimes the output seems to 
become mixed. I see appenders appearing multiple times or not at all, and 
"Finished Configuring" never appeared. This was always followed shortly by 
the above error appearing.

Any help is much appreciated.

Below is our configuration file and a snippet of a log file catching 
stdout and stderr from orion.

# Set root logger level to DEBUG and its only appender to System.
log4j.rootLogger=WARN, BaseSystem

log4j.appender.BaseSystem=org.apache.log4j.DailyRollingFileAppender
log4j.appender.BaseSystem.File=/opt/hs-data/raid/log/sam/system.log
log4j.appender.BaseSystem.DatePattern='.'yyyy-MM-dd
log4j.appender.BaseSystem.layout=org.apache.log4j.PatternLayout
log4j.appender.BaseSystem.layout.ConversionPattern=%d{ISO8601};%p;%m%n
(Continue reading)

Rabl, Christian | 7 Jul 11:41 2004
Picon

FallbackErrorHandler: Empty method body

I tried to configure a fallback appender in my log4j configuration using
the FallbackErrorHandler class, 
and was surprised that not any log event was sent to my fallback
appender. 
On debugging my test app I discovered that the implementation of the
method

	void error(String message, Exception e, int errorCode,
LoggingEvent event) 

from the Errorhandler interface, which replaces the original appender
with the fallback appender, 
was never called.

In the source code of the 1.2.8 distribution I found the following
method with an empty body:

	public  void error(String message)

But that method is called for example twice in
WriterAppender.checkEntryConditions.
I assume the method body should look like that:

	public  void error(String message) {
		error( message, null, 0, null );
	}

Christian Rabl
James Stauffer | 7 Jul 17:31 2004

RE: FallbackErrorHandler: Empty method body

I found a note saying that this can't be used with the XML config file
(DOMConfigurer).  Is that still the case?

James Stauffer

-----Original Message-----
From: Rabl, Christian [mailto:crabl <at> init-ka.de] 
Sent: Wednesday, July 07, 2004 4:41 AM
To: log4j-user <at> jakarta.apache.org
Subject: FallbackErrorHandler: Empty method body

I tried to configure a fallback appender in my log4j configuration using the
FallbackErrorHandler class, 
and was surprised that not any log event was sent to my fallback appender. 
On debugging my test app I discovered that the implementation of the method

	void error(String message, Exception e, int errorCode, LoggingEvent
event) 

from the Errorhandler interface, which replaces the original appender with
the fallback appender, 
was never called.

In the source code of the 1.2.8 distribution I found the following method
with an empty body:

	public  void error(String message)

But that method is called for example twice in
WriterAppender.checkEntryConditions.
(Continue reading)

Schuhmacher, Bret | 8 Jul 07:31 2004

Docs for SNMPTrapAppender?

I'm having a difficult time sending v2c traps via SNMPTrapAppender from
http://www.m2technologies.net/.  Let me restate that - my IBM NetView
person tells me that the v2 traps I'm sending are getting kicked out of
NetView because they're not v2c (I have to assume they're v2u, but I'm a
total SNMP neophyte :-( ).

I've tried both JoeSNMP and WengSoft and I cannot get a v2c trap
built/sent.  Is it possible to send v2c using this trap appender and
either JoeSNMP or WengSoft?  Can anyone point me to more documentation
than I found with the SNMPTrapAppender?  I'm pretty sure it's a
configuration issue on my end...  A working properties file configured
for v2c would be excellent!

Thanks! :-)

Bret
--
Bret A. Schuhmacher                             voice:  423.837.7563
Sr. Architect, Aspect Professional Services     eMail:
Bret.Schuhmacher <at> Aspect.com
Aspect Communications
Allistair Crossley | 8 Jul 14:07 2004

RE: log4j:ERROR Failed to rename : more info

The other thing is that this suggested solution does not cover DailyRollingAppender, just
RollingFileAppender and therefore the overridden code is not applicable. 

I cannot tell you how useful it would be to solve this issue as we are just haemorriging log information right now.

AC

> -----Original Message-----
> From: Allistair Crossley 
> Sent: 02 July 2004 15:24
> To: Log4J Users List
> Cc: Ceki Gülcü
> Subject: RE: log4j:ERROR Failed to rename : more info
> 
> 
> Hey there,
> 
> Sorry it took so long to reply Ceki.
> 
> The suggested fix in this bug report only monitors the result 
> of the rename. It does not fix the problem where a new file 
> is required _for sure_ at a certain time.
> 
> Another issue with this suggested fix is that it will not 
> compile because
> 
> this.setFile(filename, true)
> 
> is not a method of RollingFileAppender. The method 
> specification in that is
(Continue reading)

florian.racky | 8 Jul 17:24 2004
Picon

log4j configuration problem

Hi,

I have a problem with the configuration of log4j. What I want to do is have some classes doing their logging in
level INFO. I used the rootLogger to achieve this and it is working very well. There is another class
(de.techem.novell.fileservice.Upload) which is still under development. Therefore it should log
it's messages in level DEBUG. This is my log4j config:

log4j.rootLogger=INFO,A1
log4j.logger.de.techem.novell.fileservice.Upload=DEBUG
log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d %-5p %m%n
log4j.appender.A1.File=...filefilefilefile...

It seems to me that there is a problem in the second line of the config file because every message is logged in
level INFO. Then I changed the line to

log4j.logger.de=DEBUG

to be sure that the other classes in this package should log in level DEBUG but nothing happened. Every class
is still logging in the level defined for the rootLogger. Then I thought it might have something to do with
the classname and made log4j put the classname in my logfile changing the pattern to %d %C %-5p %m%n. After
that chage, the classname appeared in the logfile and were exactly the same as specified in line 2 of the
first version of the configfile (de.techem.novell.fileservice.Upload).

Everything I tried did not succeed, so I am mailint to this list to find someone who could help me out. Any
ideas what I am doing wrong?

Thanks for your help.
Flo
(Continue reading)


Gmane