[
https://issues.apache.org/jira/browse/LOG4J2-229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13649344#comment-13649344
]
Remko Popma edited comment on LOG4J2-229 at 5/5/13 2:48 PM:
------------------------------------------------------------
Nick, I've started to look at the DB appenders. I'm still looking and would
like to set up test databases and try this out, but initial feedback just from
the docs:
JDBC appender
* I like your approach with the Columns. The fact they can use standard Layout
is very powerful.
* It would be good to have a sample CREATE TABLE command.
* I can guess a lot from the JDBC Appender examples, but it would be good if
the Column element had documentation.
Maybe a few words on each of the attributes isEventTimestamp, pattern and
literal.
For example, Columns marked isEventTimeStamp will get the value of
event.getMillis, wrapped in a java.sql.Timestamp, or something to that effect.
(Especially the fact that the data type is Timestamp.)
NoSQL appender
* It may be good to document the keys/field names that are used to create a log
event document.
* The docs mention that writing a custom provider is quite simple, but leave it
at that.
Please provide more detail, maybe explicitly mention the three interfaces
that need to be implemented, and that one of these implementation classes
should also be a log4j2 Plug-in.
Overall it looks very nice.
was (Author: [email protected]):
Nick, I've started to look at the DB appenders. I'm still looking and still
need to set up test databases and try this out, but initial feedback just from
the docs:
JDBC appender
* I like your approach with the Columns. The fact they can use standard Layout
is very powerful.
* It would be good to have a sample CREATE TABLE command.
* I can guess a lot from the JDBC Appender examples, but it would be good if
the Column element had documentation.
Maybe a few words on each of the attributes isEventTimestamp, pattern and
literal.
For example, Columns marked isEventTimeStamp will get the value of
event.getMillis, wrapped in a java.sql.Timestamp, or something to that effect.
(Especially the fact that the data type is Timestamp.)
NoSQL appender
* It may be good to document the keys/field names that are used to create a log
event document.
* The docs mention that writing a custom provider is quite simple, but leave it
at that.
Please provide more detail, maybe explicitly mention the three interfaces
that need to be implemented, and that one of these implementation classes
should also be a log4j2 Plug-in.
Overall it looks very nice.
> New JDBC, JPA, and NoSQL Database Appenders for Log4j2
> ------------------------------------------------------
>
> Key: LOG4J2-229
> URL: https://issues.apache.org/jira/browse/LOG4J2-229
> Project: Log4j 2
> Issue Type: New Feature
> Components: Appenders, Core
> Affects Versions: 2.0-beta5
> Reporter: Nick Williams
> Attachments: db-appenders.patch
>
> Original Estimate: 168h
> Remaining Estimate: 168h
>
> As discussed on the mailing list ([1] and [2]), Log4j 2 is in need of some
> database appenders. I have added this new feature and will attach a patch
> shortly. The patch contains:
> - A slight change to PatternLayout. Currently it is not possible to create a
> PatternLayout that doesn't always handle exceptions. If you leave all
> exception handling out of the pattern, an exception handler is forcibly added
> to the end of the pattern. This behavior is controlled by a flag, but that
> flag is always hard-coded to false. I added a parameter for it. This was
> necessary for the JDBC appender.
> - o.a.l.l.core.appender.db.AbstractDatabaseManager and
> AbstractDatabaseAppender, together in concert, take care of some core
> functionality common across all database appenders, such as buffering and
> connection state.
> - o.a.l.l.core.appender.db.jdbc.JDBCAppender (and Manager, other classes)
> supports writing events to a relational database using raw JDBC. It's
> injection-safe due to the use of prepared statements. It can be configured
> with URL/username/password, JNDI data source, or a connection factory method.
> - o.a.l.l.core.appender.db.jpa.JPAAppender (and Manager, other classes)
> supports writing events to a relational database using the Java Persistence
> API version 2.0.
> - o.a.l.l.core.appender.db.nosql.NoSQLAppender (and Manager, other classes)
> supports writing to an abstract concept of a NoSQL provider. Providers have
> been created for MongoDB and Apache CouchDB. Creating a new provider is
> extremely easy.
> - Thorough unit tests for the abstract classes, the JDBC and JPA appenders,
> and the abstract parts of the NoSQLAppender. Directly unit testing the
> MongoDB and CouchDB providers in a platform-independent way is not easy and
> may not be possible.
> - Thorough documentation (both JavaDoc and Site documentation) for all of the
> appenders.
> [1] http://markmail.org/thread/z2wpmwelv7p6xh2o
> [2] http://markmail.org/thread/s7pljqdjhjz5xfk5
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]