How to get the JDBC connection close() control from log4j2

2017-12-13 Thread gaurav9...@gmail.com
Hi, My project uses custom-connection pool and wants to control connection close. But log4j2's JDBC appender uses its own Closer.close() method call in the JdbcDatabaseManager.java Is there any way to get the control for close() method to my project code instead of log4j2? Will it be okay to

Re: How do I create jdbc appender using programmatic configuration?

2017-12-01 Thread gaurav9...@gmail.com
On 2017-12-01 14:34, "gaurav9...@gmail.com" wrote: > > > On 2017-11-30 23:07, Matt Sicker wrote: > > You should be able to create one the same way you create any other appender > > using programmatic configuration. > > > > On 30 November 201

Re: How do I create jdbc appender using programmatic configuration?

2017-12-01 Thread gaurav9...@gmail.com
On 2017-11-30 23:07, Matt Sicker wrote: > You should be able to create one the same way you create any other appender > using programmatic configuration. > > On 30 November 2017 at 06:36, gaurav9...@gmail.com > wrote: > > > Hi log4j2 users, > > > >

How do I create jdbc appender using programmatic configuration?

2017-11-30 Thread gaurav9...@gmail.com
Hi log4j2 users, I want to create jdbc appender using programmatic configuration. Please provide the programmatic configuration if you already have or guide me to create it. P.S. I am able to create JDBCAppender using xml configuration Thanks -

Re: Null pointer error when writing MapMessage key's value to database

2017-10-10 Thread gaurav9...@gmail.com
On 2017-10-11 04:29, Gary Gregory wrote: > On Tue, Oct 10, 2017 at 12:42 AM, gaurav9...@gmail.com > wrote: > > > > > > > On 2017-10-06 20:32, Gary Gregory wrote: > > > Hi, > > > > > > I think you will get better help if you provide a re

Re: How to store custom-message variable values to the database table's column using log4j2

2017-10-10 Thread gaurav9...@gmail.com
rTest.xml> > for example usage (even though that uses the CassandraAppender, the same > ColumnMapping element works in JdbcAppender). > > On 10 October 2017 at 09:03, gaurav9...@gmail.com > wrote: > > > Hi Log4j2 users, > > > > I've created custom-message i

How to store custom-message variable values to the database table's column using log4j2

2017-10-10 Thread gaurav9...@gmail.com
Hi Log4j2 users, I've created custom-message implementing log4j2's 'message' interface like following tutorial https://logging.apache.org/log4j/2.x/manual/messages.html I've defined JDBCAppender in lo4j2.xml which writes values from above message to database table. I've tried using conversion-

Re: Null pointer error when writing MapMessage key's value to database

2017-10-09 Thread gaurav9...@gmail.com
t; > On Fri, Oct 6, 2017 at 8:48 AM, gaurav9...@gmail.com > wrote: > > > Hi log4j2 users, > > > > I have created a MapMessage with a key-value pair > > > > e.g. userName="log4j" > > > > I have configured JDBCAppender with > > &g

Re: Fetch message values in JDBCAppender

2017-10-08 Thread gaurav9...@gmail.com
On 2017-10-07 04:27, Matt Sicker wrote: > Can you post your config and log4j version? > > On 6 October 2017 at 00:25, gaurav deshpande wrote: > > > Please help > > -- Forwarded message -- > > From: "gaurav deshpande" > > Date: 06-Oct-2017 02:19 > > Subject: Fetch message val

Null pointer error when writing MapMessage key's value to database

2017-10-06 Thread gaurav9...@gmail.com
Hi log4j2 users, I have created a MapMessage with a key-value pair e.g. userName="log4j" I have configured JDBCAppender with But, it gives null pointer error when tried to insert into database table using %K/%map/%MAP and works when you put normal message/literal string. Note: 'userName'