logging-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject [log4j] Adding methods to org.apache.logging.log4j.core.appender.nosql.NoSqlObject<W>
Date Mon, 22 Jan 2018 05:47:35 GMT
Hi All,

The interface org.apache.logging.log4j.core.appender.nosql.NoSqlObject<W>
requires arrays in two methods:

set(String, NoSqlObject<BasicDBObject>[])
set(String, Object[])

For some providers like the new MongoDB driver 3.x provider I am working on
this causes double work. First the log4j NoSQL guts converts a list into an
array
in org.apache.logging.log4j.core.appender.nosql.NoSqlDatabaseManager.setFields(LogEvent,
NoSqlObject<W>):

entity.set("contextStack", contextStack.asList().toArray());

Then, the new NoSqlObject impl I have converts that array back into a list
to pass to Mongo.

If I wanted to add List versions of the two array APIs in NoSqlObject,
should I:

- Just add-em and adjust all providers.
- Create a NoSqlObject2 sub-interface

Thoughts?

Gary

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message