[logback-dev] Question about concurrency with custom appender [ InfluxDB Use Case ]
Nicolas Muller
n.muller at treeptik.fr
Tue Mar 31 17:50:51 CEST 2015
Hello,
I am new on this mailing list. I am a french java developper working in
Aix-en-Provence, France around Java and Docker. At the moment I am trying
to develop a bridge between InfluxDB (metrics database) and Logback. My
Proof of concept is here : https://github.com/zepouet/influxdb-logback
It is not final. Documentation will come each day. It is a young project.
Therefore I have a big question for global appender architecture.
I would like to create two loggers with one appender to reference two
differents series.
Is my solution right or may i fear threading problem with collision ?
Logback is wonderful with MDC and pattern rule for naming series.
So could you tell me if i am wrong since the beginning of my project or can
I go on ?
There is a lot of features from Logback to add in order to have a first
class citizen logger for InfluxDB.
Thanks you very much. Best regards
Nicolas
<appender name="INFLUXDB" class="org.labaix.logback.InfluxDbAppender">
<source>
<ip>192.168.59.103</ip>
<port>8086</port>
<user>root</user>
<password>root</password>
<database>testdb</database>
<create>true</create>
<version>0.8</version>
</source>
<serie>
<id>SensorTemperature</id>
<name>machine.%X{machine}.type.%X{type} temperature_${byMonth}</name>
<timeUnit>MILLISECONDS</timeUnit>
</serie>
</appender>
<logger name="SensorTemperature" level="info" additivity="false">
<appender-ref ref="INFLUXDB"/>
</logger>
<appender name="INFLUXDB2" class="org.labaix.logback.InfluxDbAppender">
<source>
<ip>192.168.59.103</ip>
<port>8086</port>
<user>root</user>
<password>root</password>
<database>userdb</database>
<create>true</create>
<version>0.8</version>
</source>
<serie>
<id>UserEvents</id>
<name>user_events_${byDay}</name>
<timeUnit>SECONDS</timeUnit>
</serie>
</appender>
<logger name="UserEvents" level="info">
<appender-ref ref="INFLUXDB2"/>
</logger>
[image: Treeptik] <http://www.treeptik.fr/> *Nicolas MULLER*
Technical Director
n.muller at treeptik.fr <f.amico at treeptik.fr>
06 18 64 73 88 / 04 42 37 06 32
www.treeptik.fr <http://www.treeptik.fr/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-dev/attachments/20150331/7423a002/attachment.html>
More information about the logback-dev
mailing list