Clive Beavis | 1 Jan 2003 01:34

RE: Problem changing log level at runtime

This does not happen for me. I use 1.2.6 and make extensive use of changes
at runtime. I use it to enable debugging on parts of the system without
having to take the system off line.

Switching from and to Debug does not present a problem.  I just use the
setLevel() methods.

Do you have any more specifics?

Regards

Clive Beavis

650 464 2604

 -----Original Message-----
From: 	Kohinoor Lal Verma (EHS) [mailto:Kohinoor.Verma <at> ehs.ericsson.se]
Sent:	Sunday, December 29, 2002 10:20 PM
To:	'Log4J Users List'
Subject:	Problem changing log level at  runtime

Hi all,

At runtime , when I change the log level from  high (say info) to low (say
debug) , log4j functions properly.
But when i try to change from  low (say debug) to high (say info) it has not
affect i.e. log4j continues to be at the  low (say debug) log level. Does
any one know why this happens? Is this a bug ?

Thanx in advance !!
(Continue reading)

Ceki Gülcü | 1 Jan 2003 11:59
Picon
Gravatar

[OT] Happy new year to all


Hi all,

Best wishes to all for the new year. I would like to thank the many
kind souls who take the time to answer users' questions. You make a
big difference!

Best regards,

--
Ceki
Mark Masterson | 1 Jan 2003 17:24
Picon

SNMPTrapAppender v. 1.2.3

Greetings,

I’m starting the New Year off with a release of the SNMPTrapAppender.  New
in this release is an additional implementation of the SnmpTrapSender
interface which uses the open source NetSNMP command line tools to send
traps.  I wrote this primarily as a proof-of-concept – several people have
written me asking how this task might be accomplished, usually because they
were interested in sending traps using OpenView/NetView’s “sendtrap” command
line tool.  The new “NetSnmpCommandLineTrapSender” should serve as an
example of one way that this could be accomplished.  There are doubtless
other, better ways!  One thing I noticed in my testing is that the
performance is not good, compared to using one of the Java libraries like
JoeSNMP, but given the context switching, JNI thunking and whatnot that goes
on behind the scenes, I didn’t find this surprising.

You can get the latest version, as always, at:

http://www.m2technologies.net/asp/snmpTrapAppender.asp

Cheers,
Mark
Kohinoor Lal Verma (EHS | 2 Jan 2003 06:30
Picon
Picon

RE: Problem changing log level at runtime

I donr use setLevel() function rather i use Propertyconfigurator.configure()
method to change the properties at runtime. Does that make any diference??

-----------------------------

Kohinoor Lal Verma,
Senior Systems Engineer,
Ericsson Mobile Commerce Platform, 
New Delhi, India.

-----Original Message-----
From: Clive Beavis [mailto:cbeavis <at> naniqsystems.com]
Sent: Wednesday, January 01, 2003 6:05 AM
To: 'Log4J Users List'
Subject: RE: Problem changing log level at runtime

This does not happen for me. I use 1.2.6 and make extensive use of changes
at runtime. I use it to enable debugging on parts of the system without
having to take the system off line.

Switching from and to Debug does not present a problem.  I just use the
setLevel() methods.

Do you have any more specifics?

Regards

Clive Beavis

650 464 2604
(Continue reading)

pawan malhotra | 2 Jan 2003 06:48
Picon
Favicon

appender open/closed status

Hi friends,
        Is there anyway to know Appended's status. I
want to know if the appender has got closed.
i am using log4j1.2.7 and RollingFileAppender.
My problem is somehow the appender is getting closed
at Runtime in unpridicatble way. I want to
reinitialized the appender if its closed..

Thanks.
Bharat K,

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
Lu, David | 2 Jan 2003 15:54
Picon

custom properties in log4j

hi everyone,

we've extended log4j with some custom pattern layouts that print the name of
the (web)application ( in addition to the logger ) logging the event.

is there a way in log4j to set the application name as a property and have
it visible to in our extended log4j classes?

we're planning on setting this property (app name) in a context listener and
later retrieving it in our custom pattern layout classes.

thanks!

david

**********************************************************************
This message, including any attachments, contains confidential information intended for a specific
individual and purpose, and is protected by law.  If you are not the intended recipient, please contact
sender immediately by reply e-mail and destroy all copies.  You are hereby notified that any disclosure,
copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.
TIAA-CREF
**********************************************************************
Francois Staes | 2 Jan 2003 16:27
Picon

MDC & ObjectRenderer problem


Hello,

It seems to me as if Objects which you put in an MDC are not correctly 
rendered. That is, they get rendered simply by calling the toString method 
instead of using the renderers registered.

I suppose the problem resides in helpers/PatternParser.java:

  private static class MDCPatternConverter extends PatternConverter {
    private String key;

    MDCPatternConverter(FormattingInfo formattingInfo, String key) {
      super(formattingInfo);
      this.key = key;
    }

    public
    String convert(LoggingEvent event) {
      Object val = event.getMDC(key);
      if(val == null) {
        return null;
      } else {
        return val.toString();
		^^^^^^^^^^^^^^
      }
    }
  }

But don't ask me how to fix it :-)
(Continue reading)

Charlin Huang | 2 Jan 2003 16:37

RE: MDC & ObjectRenderer problem


Hello, I got the following from log4j

log4j:WARN No appenders could be found for logge
(com.spectel.cvapi.modapi.ModAPIConference).
log4j:WARN Please initialize the log4j system properly.

Here is the property file I used. Is anything missing here caused above
warn or something else ?

I appreciate any advice.
Charlin Huang
========================================================================
==========

# CVAPI logger properties
#		DEBUG, INFO, WARN, ERROR and FATAL 
#
# Set root logger level to DEBUG and its only appender to console and
file.
log4j.rootLogger=WARN, stdout, R

# stdout is set to be a ConsoleAppender, uses PatternLayout, Print the
date in ISO 8601 format
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n

# R is set to be a log file
log4j.appender.R=org.apache.log4j.RollingFileAppender
(Continue reading)

Charlin Huang | 2 Jan 2003 16:39

Warning from log4j initialization


( sorry for re-send this, last one is of wrong subject title)
Hello, I got the following from log4j

log4j:WARN No appenders could be found for logge
(com.spectel.cvapi.modapi.ModAPIConference).
log4j:WARN Please initialize the log4j system properly.

Here is the property file I used. Is anything missing here caused above
warn or something else ?

I appreciate any advice.
Charlin Huang
========================================================================
==========

# CVAPI logger properties
#		DEBUG, INFO, WARN, ERROR and FATAL 
#
# Set root logger level to DEBUG and its only appender to console and
file.
log4j.rootLogger=WARN, stdout, R

# stdout is set to be a ConsoleAppender, uses PatternLayout, Print the
date in ISO 8601 format
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n

# R is set to be a log file
(Continue reading)

Esher, Marc | 2 Jan 2003 16:49

RE: Warning from log4j initialization

I was having the same trouble, and it turned out to be a class loader issue.
I had two separate web apps, each with its own log4j.properties file. Both
apps had log4j.jar in their respective lib directories. But the problem was
that i also had a log4j.jar in the jdk_home/jre/lib/ext directory, as well.
Removing the log4j.jar from the ext directory (but keeping the jar in each
web app's lib directory) solved my problems.

-----Original Message-----
From: Charlin Huang [mailto:charlin.huang <at> spectel.com]
Sent: Thursday, January 02, 2003 10:40 AM
To: Log4J Users List
Subject: Warning from log4j initialization

( sorry for re-send this, last one is of wrong subject title)
Hello, I got the following from log4j

log4j:WARN No appenders could be found for logge
(com.spectel.cvapi.modapi.ModAPIConference).
log4j:WARN Please initialize the log4j system properly.

Here is the property file I used. Is anything missing here caused above
warn or something else ?

I appreciate any advice.
Charlin Huang
========================================================================
==========

# CVAPI logger properties
#		DEBUG, INFO, WARN, ERROR and FATAL 
(Continue reading)


Gmane