You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by ysuneelreddy <sr...@smarteinc.com> on 2006/07/26 08:30:15 UTC

configuration of DBAppender with Log4j....

Hi 

This is suneel

Iam new to Log4j, we r using Log4j-1.3alpha-8 // Net Beans (Tomcat) // MySQL

My target is inserting log messages in the database.

For this I want to use DbAppender'.

For this I download the Log1.3alpha-8.jar, log4j-db-1.3alpha-8.jar.

 

I wrote log4j.xml in this way.

 

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE configuration >

 

<log4j: configuration xmlns:log4j="  <http://jakarta.apache.org/log4j/>
http://jakarta.apache.org/log4j/ ">

   <plugin name="Appender" class="org.apache.log4j.db.DBAppender"> 

      <connection Source
class="org.apache.log4j.db.DriverManagerConnectionSource"> 

        <param name="password" value="smarte911"/>

        <param name="user" value="smarte2"/>

        <param name="driverClass" value="com.mysql.jdbc.Driver"/> 

        <param name="url" value="jdbc:mysql://192.168.1.225:3306/reddy"/> 

      </connectionSource>

    </plugin>

 

   <root>

      <level value="debug"/>

   </root>

</log4j:configuration>

 

Just I did 

After I put .jar in lib && tomcat/commons/class..

It is not working

Plz tell me ..

For this what I do.

Iam waiting for ur reply.

 

Thanks & Rgds,

 

Yaramaka SuneelReddy.

Software Engineer,

Smarte Solutions,

ph : + 91 9833022044

 

 


Re: configuration of DBAppender with Log4j....

Posted by James Stauffer <st...@gmail.com>.
Look at sample log4j.xml files.  You don't have your appender attached
to any logger.

On 7/26/06, ysuneelreddy <sr...@smarteinc.com> wrote:
> Hi
>
> This is suneel
>
> Iam new to Log4j, we r using Log4j-1.3alpha-8 // Net Beans (Tomcat) // MySQL
>
> My target is inserting log messages in the database.
>
> For this I want to use DbAppender'.
>
> For this I download the Log1.3alpha-8.jar, log4j-db-1.3alpha-8.jar.
>
>
>
> I wrote log4j.xml in this way.
>
>
>
> <?xml version="1.0" encoding="UTF-8" ?>
>
> <!DOCTYPE configuration >
>
>
>
> <log4j: configuration xmlns:log4j="  <http://jakarta.apache.org/log4j/>
> http://jakarta.apache.org/log4j/ ">
>
>    <plugin name="Appender" class="org.apache.log4j.db.DBAppender">
>
>       <connection Source
> class="org.apache.log4j.db.DriverManagerConnectionSource">
>
>         <param name="password" value="smarte911"/>
>
>         <param name="user" value="smarte2"/>
>
>         <param name="driverClass" value="com.mysql.jdbc.Driver"/>
>
>         <param name="url" value="jdbc:mysql://192.168.1.225:3306/reddy"/>
>
>       </connectionSource>
>
>     </plugin>
>
>
>
>    <root>
>
>       <level value="debug"/>
>
>    </root>
>
> </log4j:configuration>
>
>
>
> Just I did
>
> After I put .jar in lib && tomcat/commons/class..
>
> It is not working
>
> Plz tell me ..
>
> For this what I do.
>
> Iam waiting for ur reply.
>
>
>
> Thanks & Rgds,
>
>
>
> Yaramaka SuneelReddy.
>
> Software Engineer,
>
> Smarte Solutions,
>
> ph : + 91 9833022044
>
>
>
>
>
>
>


-- 
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: configuration of DBAppender with Log4j....

Posted by Jacob Kjome <ho...@visi.com>.
Hi Yaramaka,

You wrote two separate emails in a row to this list with completely 
different attempts at solving the same problem.  Besides that, you 
wrote to my personal email address 3 times trying to get me to write 
your config file.  Your sense of email list etiquette is 
lacking.  It's also clear that you have not done much of your own 
research before asking the list for help.  It also seems odd to me 
that, with your seeming lack of experience, you would attempt to use 
an alpha release that is very much less documented than the existing 
stable 1.2.xx releases.  Here are some hints that might help you...

1.  Learn email list etiquette.  Try reading this... 
http://jakarta.apache.org/site/mail.html
2.  http://google.com/ and http://ask.com/ are your friends.  Use them.
3.  Searchable list archives can be even more 
helpful:  http://marc.theaimsgroup.com/?l=log4j-user&r=1&w=2
4.  Project documentation can 
help:  http://logging.apache.org/log4j/docs/documentation.html
5.  The log4j wiki can help: 
http://wiki.apache.org/logging-log4j/Log4JProjectPages
6.  using the latest *stable* version can help 
(1.2.13):  http://logging.apache.org/site/binindex.cgi
7.  looking at the source can 
help:  http://logging.apache.org/site/repositories.html

If you make a good faith effort come up with a solution and you still 
need help, people will help you.  If you email people directly at 
their personal addresses multiple times and are otherwise rude, you 
will get only as much help as you deserve.

Jake

At 01:30 AM 7/26/2006, you wrote:
 >Hi
 >
 >This is suneel
 >
 >Iam new to Log4j, we r using Log4j-1.3alpha-8 // Net Beans (Tomcat) // MySQL
 >
 >My target is inserting log messages in the database.
 >
 >For this I want to use DbAppender'.
 >
 >For this I download the Log1.3alpha-8.jar, log4j-db-1.3alpha-8.jar.
 >
 >
 >
 >I wrote log4j.xml in this way.
 >
 >
 >
 ><?xml version="1.0" encoding="UTF-8" ?>
 >
 ><!DOCTYPE configuration >
 >
 >
 >
 ><log4j: configuration xmlns:log4j="  <http://jakarta.apache.org/log4j/>
 >http://jakarta.apache.org/log4j/ ">
 >
 >   <plugin name="Appender" class="org.apache.log4j.db.DBAppender">
 >
 >      <connection Source
 >class="org.apache.log4j.db.DriverManagerConnectionSource">
 >
 >        <param name="password" value="smarte911"/>
 >
 >        <param name="user" value="smarte2"/>
 >
 >        <param name="driverClass" value="com.mysql.jdbc.Driver"/>
 >
 >        <param name="url" value="jdbc:mysql://192.168.1.225:3306/reddy"/>
 >
 >      </connectionSource>
 >
 >    </plugin>
 >
 >
 >
 >   <root>
 >
 >      <level value="debug"/>
 >
 >   </root>
 >
 ></log4j:configuration>
 >
 >
 >
 >Just I did
 >
 >After I put .jar in lib && tomcat/commons/class..
 >
 >It is not working
 >
 >Plz tell me ..
 >
 >For this what I do.
 >
 >Iam waiting for ur reply.
 >
 >
 >
 >Thanks & Rgds,
 >
 >
 >
 >Yaramaka SuneelReddy.
 >
 >Software Engineer,
 >
 >Smarte Solutions,
 >
 >ph : + 91 9833022044
 >
 >
 >
 >


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org