Nicolas Muller | 31 Mar 17:50 2015
Picon

Question about concurrency with custom appender [ InfluxDB Use Case ]


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>


    Nicolas MULLER

Technical Director

n.muller <at> treeptik.fr

06 18 64 73 88 / 04 42 37 06 32


 www.treeptik.fr 

_______________________________________________
logback-dev mailing list
logback-dev@...
http://mailman.qos.ch/mailman/listinfo/logback-dev
Al Dispennette (JIRA | 27 Mar 19:45 2015
Picon

[JIRA] (LBAUDIT-5) Logback and Logback-audit don't seem to be compatible when used in the same project

Al Dispennette commented on LBAUDIT-5

Hello,
Is the audit project a dead project?
Has anyone even looked at this?

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
_______________________________________________
logback-dev mailing list
logback-dev@...
http://mailman.qos.ch/mailman/listinfo/logback-dev
Travis CI | 26 Mar 22:59 2015

Fixed: qos-ch/logback#121 (master - 33b6188)

qos-ch / logback (master)
Build #121 was fixed.
2 minutes and 25 seconds
Ceki Gulcu 33b6188 Changeset →
  attempt at correcting Travis build #120 failure

Travis CI supports Rails Girls Summer of Code 2015

Please join us in helping to get more women into Open Source. Read more ...

Want to know about upcoming build environment updates?

Would you like to stay up-to-date with the upcoming Travis CI build environment updates? We set up a mailing list for you! Sign up here.

Would you like to test your private code?

Travis Pro could be your new best friend!

_______________________________________________
logback-dev mailing list
logback-dev@...
http://mailman.qos.ch/mailman/listinfo/logback-dev
Ceki Gulcu | 26 Mar 22:48 2015
Picon

[qos-ch/logback] 33b618: attempt at correcting Travis build #120 failure

  Branch: refs/heads/master
  Home:   https://github.com/qos-ch/logback
  Commit: 33b61881f947263cac6d34a7d8cac534e720548a
      https://github.com/qos-ch/logback/commit/33b61881f947263cac6d34a7d8cac534e720548a
  Author: Ceki Gulcu <ceki@...>
  Date:   2015-03-26 (Thu, 26 Mar 2015)

  Changed paths:
    M logback-classic/src/test/java/ch/qos/logback/classic/sift/MDCBasedDiscriminatorTest.java
    M logback-classic/src/test/java/ch/qos/logback/classic/sift/SiftingAppenderTest.java

  Log Message:
  -----------
  attempt at correcting Travis build #120 failure

_______________________________________________
logback-dev mailing list
logback-dev@...
http://mailman.qos.ch/mailman/listinfo/logback-dev
Travis CI | 26 Mar 22:12 2015

Still Failing: qos-ch/logback#120 (master - 411a9e5)

qos-ch / logback (master)
Build #120 is still failing.
1 minute and 59 seconds
Ceki Gulcu 411a9e5 Changeset →
  better docs, correct compiler warnings, more tests

Travis CI supports Rails Girls Summer of Code 2015

Please join us in helping to get more women into Open Source. Read more ...

Want to know about upcoming build environment updates?

Would you like to stay up-to-date with the upcoming Travis CI build environment updates? We set up a mailing list for you! Sign up here.

Would you like to test your private code?

Travis Pro could be your new best friend!

_______________________________________________
logback-dev mailing list
logback-dev@...
http://mailman.qos.ch/mailman/listinfo/logback-dev
Ceki Gulcu | 26 Mar 22:02 2015
Picon

[qos-ch/logback] 411a9e: better docs, correct compiler warnings, more tests

  Branch: refs/heads/master
  Home:   https://github.com/qos-ch/logback
  Commit: 411a9e5fbf7689899e31f3e48c3a71a34db1e1e3
      https://github.com/qos-ch/logback/commit/411a9e5fbf7689899e31f3e48c3a71a34db1e1e3
  Author: Ceki Gulcu <ceki@...>
  Date:   2015-03-26 (Thu, 26 Mar 2015)

  Changed paths:
    M logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedFileNamingAndTriggeringPolicyBase.java
    M logback-core/src/main/java/ch/qos/logback/core/rolling/helper/DefaultArchiveRemover.java
    M logback-core/src/main/java/ch/qos/logback/core/rolling/helper/FileNamePattern.java
    M logback-core/src/main/java/ch/qos/logback/core/rolling/helper/IntegerTokenConverter.java
    M logback-core/src/main/java/ch/qos/logback/core/util/CachingDateFormatter.java
    M logback-core/src/test/java/ch/qos/logback/core/rolling/helper/FileNamePatternTest.java
    A logback-core/src/test/java/ch/qos/logback/core/util/CachingFotmatterTest.java
    M logback-core/src/test/java/ch/qos/logback/core/util/DatePatternToRegexTest.java
    M logback-site/src/site/pages/manual/appenders.html

  Log Message:
  -----------
  better docs, correct compiler warnings, more tests

_______________________________________________
logback-dev mailing list
logback-dev@...
http://mailman.qos.ch/mailman/listinfo/logback-dev
Giovani Schram | 26 Mar 19:07 2015
Picon

Do not log system.out after roll - RollingFileAppender

Hello guys,


I am using tomcat server, maven, spring framework and logback.

I'm trying to use RollingFileAppender but I have a big problem. I need to log the contents of a web service request that is logged as system.out. When I start the server logs everything normally, both logs using org.slf4j.LoggerFactory as system.out, but when you turn the log at midnight, it generates a backup of the old log and created a new log. This process is ok, but this new log, after the turn does not allow loggin with system.out and therefore fails to logging the webservice request and response.

Below is my logback:

<configuration scan="true" scanPeriod="30 seconds">

<property name="LOG_PATH" value="${TOMCAT_HOME}/logs" />
<property name="LOG_PATH_BACKUP" value="${TOMCAT_HOME}/logs/backup" />

<appender name="SERVER" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_PATH}/server.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- rollover daily -->
<FileNamePattern>${LOG_PATH_BACKUP}/server/server.%d{yyyy-MM-dd}.log.gz</FileNamePattern>
</rollingPolicy>
<encoder>
<Pattern>%green(%d) %highlight(%-5level) %cyan(%logger{0}) mdc=%X{id}%msg %n</Pattern>
</encoder>
</appender>

<root level="INFO">
<appender-ref ref="SERVER" />
</root>
</configuration>

What can I do to solve this problem, please?



---------------------------
Att,
Giovani Schram
---------------------------
_______________________________________________
logback-dev mailing list
logback-dev@...
http://mailman.qos.ch/mailman/listinfo/logback-dev
Travis CI | 26 Mar 17:36 2015

Broken: qos-ch/logback#119 (master - 6767e7c)

qos-ch / logback (master)
Build #119 was broken.
2 minutes and 3 seconds
Ceki Gulcu 6767e7c Changeset →
  added cobertura.ser to list of files ignored by git

Travis CI supports Rails Girls Summer of Code 2015

Please join us in helping to get more women into Open Source. Read more ...

Want to know about upcoming build environment updates?

Would you like to stay up-to-date with the upcoming Travis CI build environment updates? We set up a mailing list for you! Sign up here.

Would you like to test your private code?

Travis Pro could be your new best friend!

_______________________________________________
logback-dev mailing list
logback-dev@...
http://mailman.qos.ch/mailman/listinfo/logback-dev
Ceki Gulcu | 26 Mar 17:21 2015
Picon

[qos-ch/logback] 6767e7: added cobertura.ser to list of files ignored by gi...

  Branch: refs/heads/master
  Home:   https://github.com/qos-ch/logback
  Commit: 6767e7ce0b90743c101d347194768a32c0b0380d
      https://github.com/qos-ch/logback/commit/6767e7ce0b90743c101d347194768a32c0b0380d
  Author: Ceki Gulcu <ceki@...>
  Date:   2015-03-26 (Thu, 26 Mar 2015)

  Changed paths:
    M .gitignore

  Log Message:
  -----------
  added cobertura.ser to list of files ignored by git

_______________________________________________
logback-dev mailing list
logback-dev@...
http://mailman.qos.ch/mailman/listinfo/logback-dev
Ceki Gulcu | 26 Mar 17:19 2015
Picon

[qos-ch/logback] 57f7d1: added cobertura support for the build

  Branch: refs/heads/master
  Home:   https://github.com/qos-ch/logback
  Commit: 57f7d181cecba412ae8be8b0cc69116960dbdd4b
      https://github.com/qos-ch/logback/commit/57f7d181cecba412ae8be8b0cc69116960dbdd4b
  Author: Ceki Gulcu <ceki@...>
  Date:   2015-03-26 (Thu, 26 Mar 2015)

  Changed paths:
    M logback-examples/pom.xml
    M pom.xml

  Log Message:
  -----------
  added cobertura support for the build

_______________________________________________
logback-dev mailing list
logback-dev@...
http://mailman.qos.ch/mailman/listinfo/logback-dev
Ramon Gordillo (JIRA | 25 Mar 22:53 2015
Picon

[JIRA] (SLF4J-319) Category.getAppender(String name) not implemented yet

Issue Type: Improvement
Affects Versions: 1.7.x
Assignee: Logback dev list
Components: log4j-over-slf4j
Created: 25/Mar/15 10:51 PM
Description:

Hi.

I am an architect that works with Tibco for a long time. Its BusinessWorks product (the old 5.x) has an option to use log4j, and as new 6.x version uses slf4j and logback, we will like to start using all the potential in 5.x too.

We have set up the log4j bridge, but we need the Category.getAppender(String name) method that is not currently implemented.

Can you please add the following method to the log4j-over-slf4j project (org.apache.log4j.Category class)?

public Appender getAppender(String name)

{ // return null to avoid NoSuchMethodException return null; }

Many thanks

Project: SLF4J
Priority: Major
Reporter: Ramon Gordillo
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
_______________________________________________
logback-dev mailing list
logback-dev@...
http://mailman.qos.ch/mailman/listinfo/logback-dev

Gmane