I've done something similar, except I use an ArrayList to keep an ordered
list of insert values to fill in the ? for the prepared statement. I store
the actual SQL string in the database as well, and pull it out at
initialization. I may begin storing all the init properties in the
database, and
The main issue is that there is no layout object. You need to make sure
that getLogStatement has a valid layout. If the layout is null you need to
create a new layout object.
I do this in my setSql statement, although you could put it inside
getLayout() and hide the logic:
if (getLayout() ==
The parameters follow the JavaBean specification, so any parameter in
JDBCAppender blah will follow setBlah, getBlah. Log4J can't find the
setUsername(String u) method, for instance.
St
Modify JDBCAppender and print out the driver name. Check to see what it's
initializing as. Also, make sure the driver is in your classpath.
Steve
okay, I'll look at those other appenders and see what they extend, etc.
Thanks!
St
"Klein, Scott @
Okay, sounds good. Is "locationInfo" a field in log4j somewhere? The
JDBCAppender extends the AppenderSkeleton class, which doesn't seem to have
a locationInfo method. I can add the field, but how does log4j pick that
up? Is the JMX smart enough to do that?
Thanks,
Steve
Well, I'm extending the JDBCAppender to use its own thread, and to use a
prepared statement, so I have my own columns for classname, etc. I'm using
(in development) Win 2000 and WebLogic 6.1. I'm going to try to put some
log4j calls in actual classes (not JSPs) and see if it can pick it up.
W
I'm using log4j within my JSPs, and I'd like to log the class name, etc in
my message, but all I get for the class name is ?. Is this some
limitations on JSPs, or is there something I'm missing? I looked through
the archive to see if there was anything similar, but I didn't find
anything.
THank
Ah ha! Yes, I can't believe I forgot about that. Thanks a mil.
Steve
Ceki Gülcü
This is what I have. I'm getting a different error now. I've tried it
with both 1.1 and 1. 0 and neither seem to work. Is there a trick I'm
missing?
build.jmx:
[javac] Compiling 7 source files to C:
\javatools\jakarta-log4j-1.2.2\dist\cl
asses
[javac] C:
\javatools\jakarta-log4j-1.2.2
Okay, I'll look for that. Thank you. It makes sense now that I think
about it, I just couldn't figure out which jmx classes I needed :
Steve
jmxCheck:
I'm modifying JDBCAppender to change the db settings in the class, but when
I try to rebuild the src directory I get this:
jmx:
[echo] JMX is present.
build.jmx:
[javac] Compiling 7 source files to C:
\javatools\jakarta-log4j-1.2.2\dist\cl
asses
[javac] C:
\javatools\jakar
12 matches
Mail list logo