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

2017-10-11 Thread Matt Sicker
Well, pattern converters like that are for serializing a LogEvent to a string. You could split up your message keys like this: Another option might be to use MessageLayout < https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/Messa

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

2017-10-10 Thread gaurav9...@gmail.com
On 2017-10-11 00:49, Matt Sicker wrote: > Are you using ColumnMapping? See < > https://logging.apache.org/log4j/2.x/manual/appenders.html#JDBCAppender>. > > See < > https://github.com/apache/logging-log4j2/blob/master/log4j-nosql/src/test/resources/CassandraAppenderTest.xml> > for example usag

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

2017-10-10 Thread Matt Sicker
Are you using ColumnMapping? See < https://logging.apache.org/log4j/2.x/manual/appenders.html#JDBCAppender>. See < https://github.com/apache/logging-log4j2/blob/master/log4j-nosql/src/test/resources/CassandraAppenderTest.xml> for example usage (even though that uses the CassandraAppender, the same

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

2017-10-10 Thread Matt Sicker
-- Forwarded message -- From: Gaurav Deshpande Date: 10 October 2017 at 09:02 Subject: How to store custom-message variable values to the database table's column using log4j2 To: "mattsic...@apache.org" , "rgo...@apache.org" < rgo...@apache.org>

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-