logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remko Popma <rem...@yahoo.com>
Subject Re: Database Appenders
Date Thu, 25 Apr 2013 15:01:44 GMT
I think this is the link Gary is talking about: (from the wiki)
Build a NoSQL Appender, maybe with AppScale: http://appscale.cs.ucsb.edu/datastores.html Inspiration
came from the log4j1 appender for redis: https://github.com/pavlobaron/log4j2redis

Agree with Gary on keeping things simple. Also agree every new feature needs to be in beta
for a while to shake out bugs etc. I don't have an opinion on whether to include jdbc appenders
in the first 2.0 release or add them later. 

You know, I was actually thinking to write a tutorial for custom plugin developers, called
"(How to) Write Your Own Darn JdbcAppender!" :-)

Sent from my iPhone

On 2013/04/25, at 23:51, Gary Gregory <garydgregory@gmail.com> wrote:

> On Thu, Apr 25, 2013 at 10:39 AM, Nicholas Williams <nicholas@nicholaswilliams.net>
>> First, a quick question: do we anticipate the next version to be beta6 or rc1? Just
> As long as we are adding features, I'd like to keep rolling Betas. But it would also
be OK to release 2.0 and add appenders later.
> I tried porting our app to 2.0 a couple of weeks ago but ran into lots of issues, so
I'll need to take another stab at it in a couple of weeks again. We rely on a lot of 1.0 guts
so I'll have to think about that some more...
>> I'm currently working on cleaning up compiler warnings throughout the project and
should have that completed soon.
> Great!
>> I want to go ahead and get the conversation started about database appenders. I'd
like to see two appenders:
>> - A JdbcAppender that is capable of logging to any RDBMS for which there is a JDBC
>> - A MongoAppender that is capable of logging to a MongoDB database.
> We should not need a MongoDB appender if there is a JDBC driver for it: docs.mongodb.org/ecosystem/drivers/java/
>> The JdbcAppender and MongoAppender would, as far as I can tell, need properties for
mapping all of the possible logging event properties to table columns (or Mongo equivalent).
I don't really see any other way to accomplish that. We could use layout patterns from the
PatternLayout to achieve this: <column name="columnName" pattern="PatternLayout equivalent-pattern"
> You can look at Log4J 1 for inspiration. Keep it simple for a start. I think version
1 just let's you specify a SQL INSERT instead of using some XML for mapping.
>> I imagine the JdbcAppender having mutually exclusive properties for JDBC URL/username/password,
DataSource JNDI URL, and class.staticFactoryMethod for obtaining a DataSource.
> Keep is simple for the first cut ;)
>> The MongoAppender would similarly have mutually exclusive properties for connection
information and class.statucFactoryMethod for obtaining a Mongo instance.
>> I'd like to take a stab at these after I complete fixing compiler warnings, and wanted
to start getting feedback/ideas and also see if anyone has use cases for other NoSQL appenders.
> Search the ML for my note on NoSQL, it looks like there is a JDBC-like API for NoSQL
> Gary
> -- 
> E-Mail: garydgregory@gmail.com | ggregory@apache.org 
> Java Persistence with Hibernate, Second Edition
> JUnit in Action, Second Edition
> Spring Batch in Action
> Blog: http://garygregory.wordpress.com 
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory

View raw message