Luc_Bell | 5 Aug 18:29 2002

Writing a filter


Anyone have an example of a "working" StringMatchFilter implemented through
a 1.1.3 log4j.properties (syntax) file?

I have tried the below and it is giving the subsequest error.

log4j.appender.bmc=org.apache.log4j.DailyRollingFileAppender
log4j.appender.bmc.filter=org.apache.log4j.StringMatchFilter
log4j.appender.bmc.filter.StringToMatch=car
log4j.appender.bmc.filter.AcceptOnMatch=true
log4j.appender.bmc.File=\\\\c:\\java\\logs\\notification.log
log4j.appender.bmc.layout=org.apache.log4j.PatternLayout
log4j.appender.bmc.layout.ConversionPattern=%5p [%t] (%F:%M:%L) %x - %m%n
log4j.appender.bmc.DatePattern='.'yyyy-MM-dd

I get....

log4j:WARN Failed to set property filter to value
"org.apache.log4j.StringMatchFilter". No setter for property
log4j:WARN Failed to set property filter to value
"org.apache.log4j.StringMatchFilter". No setter for property
log4j:WARN Failed to set property filter to value
"org.apache.log4j.StringMatchFilter". No setter for property

Thanks,
Luc Bell
Thomas Muller | 5 Aug 18:31 2002
Picon
Picon

RE: Writing a filter

From PropertyConfigurator javadoc:

"The PropertyConfigurator does not handle the advanced configuration
features supported by the DOMConfigurator such as support for Filters,
custom ErrorHandlers, nested appenders such as the AsyncAppender, etc."

--

Thomas

 | -----Original Message-----
 | From: Luc_Bell <at> circuitcity.com [mailto:Luc_Bell <at> circuitcity.com]
 | Sent: 05 August 2002 17:30
 | To: Log4J Users List
 | Subject: Writing a filter
 |
 |
 |
 | Anyone have an example of a "working" StringMatchFilter
 | implemented through
 | a 1.1.3 log4j.properties (syntax) file?
 |
 | I have tried the below and it is giving the subsequest error.
 |
 |
 | log4j.appender.bmc=org.apache.log4j.DailyRollingFileAppender
 | log4j.appender.bmc.filter=org.apache.log4j.StringMatchFilter
 | log4j.appender.bmc.filter.StringToMatch=car
 | log4j.appender.bmc.filter.AcceptOnMatch=true
 | log4j.appender.bmc.File=\\\\c:\\java\\logs\\notification.log
(Continue reading)

ryan.cuprak | 5 Aug 18:38 2002
Picon

Verify Error

From: Ryan D. Cuprak

 Just curious if anyone knows what the following error means- I just
downloaded log4j and dropped the jar file into jboss/lib directory:

 Thanks,
Ryan Cuprak

[ERROR,ContainerFactory] Verify failure
java.lang.VerifyError: (class: org/apache/log4j/LogManager, method: <clinit> signature: ()V)
Incompatible argument to function
        at org.apache.log4j.Logger.getLogger(Logger.java:85)
        at com.kodak.sis.ejb.gel.image.GelImageBean.<clinit>(Unknown Source)
        at java.lang.Class.newInstance0(Native Method)
        at java.lang.Class.newInstance(Unknown Source)
        at org.jboss.verifier.strategy.AbstractVerifier.hasDefaultConstructor(AbstractVerifier.java:369)
        at org.jboss.verifier.strategy.EJBVerifier11.verifyEntityBean(EJBVerifier11.java:1209)
        at org.jboss.verifier.strategy.EJBVerifier11.checkEntity(EJBVerifier11.java:120)
        at org.jboss.verifier.BeanVerifier.verify(BeanVerifier.java:132)
        at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:452)
        at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:370)
        at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:307)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
        at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
        at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:487)
        at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:459)
        at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:190)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
(Continue reading)

Shapira, Yoav | 5 Aug 18:50 2002

RE: Verify Error

Howdy,
Simple to diagnose, possibly difficult to fix:

- Problem: you have more than one version of the relevant class (in this
case LogManager) in your classpath.
- Solution: remove jars until you only have one version of the relevant
class in your classpath.  

Yoav Shapira
Millennium ChemInformatics

>-----Original Message-----
>From: ryan.cuprak <at> kodak.com [mailto:ryan.cuprak <at> kodak.com]
>Sent: Monday, August 05, 2002 12:38 PM
>To: log4j-user <at> jakarta.apache.org
>Subject: Verify Error
>
>From: Ryan D. Cuprak
>
> Just curious if anyone knows what the following error means- I just
>downloaded log4j and dropped the jar file into jboss/lib directory:
>
> Thanks,
>Ryan Cuprak
>
>[ERROR,ContainerFactory] Verify failure
>java.lang.VerifyError: (class: org/apache/log4j/LogManager, method:
><clinit> signature: ()V) Incompatible argument to function
>        at org.apache.log4j.Logger.getLogger(Logger.java:85)
>        at com.kodak.sis.ejb.gel.image.GelImageBean.<clinit>(Unknown
(Continue reading)

ryan.cuprak | 5 Aug 18:51 2002
Picon

Re: Verify Error


From: Ryan D. Cuprak

Just thought I'd add that recompiling log4j does not solve this problem.

-Ryan Cuprak

ryan.cuprak <at> kodak.com on 08/05/2002 12:38:21 PM

Please respond to "Log4J Users List" <log4j-user <at> jakarta.apache.org>

To:    log4j-user <at> jakarta.apache.org
cc:
Subject:    Verify Error

From: Ryan D. Cuprak

 Just curious if anyone knows what the following error means- I just
downloaded log4j and dropped the jar file into jboss/lib directory:

 Thanks,
Ryan Cuprak

[ERROR,ContainerFactory] Verify failure
java.lang.VerifyError: (class: org/apache/log4j/LogManager, method:
<clinit> signature: ()V) Incompatible argument to function
        at org.apache.log4j.Logger.getLogger(Logger.java:85)
        at com.kodak.sis.ejb.gel.image.GelImageBean.<clinit>(Unknown
Source)
        at java.lang.Class.newInstance0(Native Method)
(Continue reading)

Ceki Gülcü | 5 Aug 19:03 2002
Picon

Re: Verify Error


Which version of JBoss is this?

At 12:51 05.08.2002 -0400, ryan.cuprak <at> kodak.com wrote:

>From: Ryan D. Cuprak
>
>Just thought I'd add that recompiling log4j does not solve this problem.
>
>-Ryan Cuprak
>
>
>
>
>ryan.cuprak <at> kodak.com on 08/05/2002 12:38:21 PM
>
>Please respond to "Log4J Users List" <log4j-user <at> jakarta.apache.org>
>
>To:    log4j-user <at> jakarta.apache.org
>cc:
>Subject:    Verify Error
>
>
>From: Ryan D. Cuprak
>
>  Just curious if anyone knows what the following error means- I just
>downloaded log4j and dropped the jar file into jboss/lib directory:
>
>  Thanks,
>Ryan Cuprak
(Continue reading)

ryan.cuprak | 5 Aug 19:22 2002
Picon

Re: Verify Error


From: Ryan D. Cuprak

 I believe I had downloaded:
  JBoss-2.4.6_Tomcat-4.0.3.zip
 which was several weeks ago now.

 I just fixed the problem by replacing the log4j.jar in lib/ext and
changing the name of the jar in jboss.conf.

-Ryan

Ceki Gülcü <ceki <at> qos.ch> on 08/05/2002 01:03:55 PM

Please respond to "Log4J Users List" <log4j-user <at> jakarta.apache.org>

To:    "Log4J Users List" <log4j-user <at> jakarta.apache.org>
cc:
Subject:    Re: Verify Error

Which version of JBoss is this?

At 12:51 05.08.2002 -0400, ryan.cuprak <at> kodak.com wrote:

>From: Ryan D. Cuprak
>
>Just thought I'd add that recompiling log4j does not solve this problem.
>
>-Ryan Cuprak
>
(Continue reading)

ryan.cuprak | 5 Aug 22:40 2002
Picon

Jboss/Log4j Question - standard out


From: Ryan D. Cuprak

 Hello,
  Just curious as to how I can get the console appender to send to the
"console" when using jboss on windows. I launch jboss from the commandline
(cmd.exe) and prior to moving to jboss used system.out/err.println for
informational purposes which got dumped to the "cmd.exe" window which I
assumed was standard out. Now, when I use the consoleappender with jboss,
the output goes to server.log. Note, I cannot use the log4 integration in
jboss as I want my enterprise app to be container independent.

 Any help would be appreciated - I am in the process of learning log4j (I
have finally seen the light).

-Ryan Cuprak
Bhangale, Bhushan | 6 Aug 00:39 2002

JDBCAppender problem

Hi Everybody,

I am trying to use JDBCAppender in 1.2.6 version of log4j. It is giving me
following exception

java.sql.SQLException: Must declare the variable ' <at> MSG <at> ' <mailto:' <at> MSG <at> '> .
Severity 15, State 2,
Procedure 'GTSNY94 null', Line 1
        at
weblogic.jdbcbase.mssqlserver4.TdsStatement.processWarning(TdsStateme
nt.java:1207)
        at
weblogic.jdbcbase.mssqlserver4.TdsStatement.parseMsWarning(TdsStateme
nt.java:1129)
        at
weblogic.jdbcbase.mssqlserver4.TdsStatement.getMoreResults(TdsStateme
nt.java:812)
        at
weblogic.jdbcbase.mssqlserver4.TdsStatement.execute(TdsStatement.java
:211)
        at
weblogic.jdbcbase.mssqlserver4.TdsStatement.executeUpdate(TdsStatemen
t.java:94)
        at org.apache.log4j.jdbc.JDBCAppender.execute(JDBCAppender.java:163)
        at
org.apache.log4j.jdbc.JDBCAppender.flushBuffer(JDBCAppender.java:235)

        at org.apache.log4j.jdbc.JDBCAppender.append(JDBCAppender.java:131)
        at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
(Continue reading)

Chris Bailey | 6 Aug 02:05 2002

How can I kill chainsaw debug output?

When I run Chainsaw, it spits out lots of logging info to the console, such
as:

[main] DEBUG org.apache.log4j.chainsaw.MyTableModel - Total time [ms]: 0 in
upda
te, size: 0
[Thread-3] INFO org.apache.log4j.chainsaw.LoggingReceiver - Thread started
[Thread-3] DEBUG org.apache.log4j.chainsaw.LoggingReceiver - Waiting for a
conne
ction

On UNIX type platforms I'm sure I can just redirect this to /dev/null if I
don't want to see it, but what do I do on Windows?  Specifically what I want
to do is to be able to launch chainsaw without having to have a DOS box
sitting there open on my machine.

I've tried two things so far, but both are not ideal due to the above:
1) Use a batch file and run it with the "start" command.  This would be
fine, since I usually have one DOS box open for doing various build junk or
whatever, but I just don't want it cluttered with the log4j output.
2) Run it as a service with JVMI2 (http://www.kcmultimedia.com/jvmi/) and
redirect stdout/err to a log file using their Logger stuff; this seems to
have failed to redirect and also still opens another DOS box, which is what
I wanted to avoid.

____
Chris Bailey       mailto:chris <at> codeintensity.com
Code Intensity       http://www.codeintensity.com

Gmane