Matt Whipple (JIRA | 29 Jul 13:03 2015
Picon

[JIRA] (LOGBACK-1092) Add GEventEvaluator to logback access

Matt Whipple commented on LOGBACK-1092

I can submit a PR for this but want to sanity check the approach. I'd mirror the Janino approach and extract a generic Base class into core.

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
Matt Whipple (JIRA | 29 Jul 13:01 2015
Picon

[JIRA] (LOGBACK-1092) Add GEventEvaluator to logback access

Issue Type: Improvement
Assignee: Logback dev list
Components: logback-access
Created: 29/Jul/15 1:00 PM
Description:

Presently logback-access a JaninoEventEvaluator but not a GEventEvaluator (though at a glance it would work if not for the type parameter). This would provide the same value (though to a smaller audience) as it does in logback-classic.

Project: logback
Priority: Minor
Reporter: Matt Whipple
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
Todd Prickett | 23 Jul 15:34 2015

logback console display not honoring threshold filter

I have a logback.xml file containing the following:

<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
    <param name="Target" value="System.out"/>
    <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
        <level>INFO</level>
    </filter>
    <encoder>
        <pattern>%date %-4relative [%thread] %-5level %logger{35} - %msg %n</pattern>
    </encoder>
</appender>

<appender name="debugfile" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>debugFile.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
        <fileNamePattern>debugFile.%d{yyyy-MM-dd}.log</fileNamePattern>
        <MaxHistory>30</MaxHistory>
    </rollingPolicy>
    <encoder>
        <pattern>%date %-4relative [%thread] %-5level %logger{35} - %msg %n</pattern>
    </encoder>
</appender>

<appender name="infofile" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>infoFile.log</file>
    <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
        <level>INFO</level>
    </filter>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
        <fileNamePattern>infoFile_%i.log</fileNamePattern>
        <minIndex>1</minIndex>
        <maxIndex>3</maxIndex>
    </rollingPolicy>
    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
        <maxFileSize>1MB</maxFileSize>
    </triggeringPolicy>
    <encoder>
        <pattern>%date %-4relative [%thread] %-5level %logger{35} - %msg %n</pattern>
    </encoder>
</appender>

<appender name="warnfile" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>infoFile.log</file>
    <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
        <level>WARN</level>
    </filter>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
        <fileNamePattern>warnFile_%i.log</fileNamePattern>
        <minIndex>1</minIndex>
        <maxIndex>3</maxIndex>
    </rollingPolicy>
    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
        <maxFileSize>1MB</maxFileSize>
    </triggeringPolicy>
    <encoder>
        <pattern>%date %-4relative [%thread] %-5level %logger{35} - %msg %n</pattern>
    </encoder>
</appender>

<root>
    <appender-ref ref="console"/>
    <appender-ref ref="debugfile"/>
    <appender-ref ref="infofile"/>
<appender-ref ref="warnfile"/>
</root>

I want it to only show me INFO level logs or greater. So, I added the ThresholdFilter and set its level to INFO.
Doing this worked for the RollingFileAppender (where one includes INFO and greater and the other
includes DEBUG and greater).This didn't make a difference as the console statements continue to include
DEBUG level statements. Can anyone tell me why?

 		 	   		  
Paulius Matulionis (JIRA | 23 Jul 12:00 2015
Picon

[JIRA] (LOGBACK-1054) NullPointerException from RollingFileAppender

Have anyone looked at this issue?

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
Jörn Huxhorn | 17 Jul 11:59 2015

JEP draft: Efficient API for Stack Walking / sun.reflect.Reflection replacement

Hi fellow devs.

I’m cross-posting this to logback-dev and log4j-dev since I think both projects may benefit from
staying up-to-date on this topic.

This JEP discusses a public replacement API for the internal sun.reflect.Reflection which at least
Logback is currently using (if available) in ch.qos.logback.classic.spi.PackagingDataCalculator.

http://openjdk.java.net/jeps/8043814
https://bugs.openjdk.java.net/browse/JDK-8043814

This is just meant as a heads-up.

Given that it’s not possible to just sign up for the openjdk JIRA to watch an issue I’m having a hard time
staying in the loop. So more people keeping an eye on it won’t hurt.

Discussion is supposed to happen on core-libs-dev <at> openjdk.java.net but the latest mail I could find
about the topic was written on 2014-07-09...

Cheers,
Jörn.
_______________________________________________
logback-dev mailing list
logback-dev <at> qos.ch
http://mailman.qos.ch/mailman/listinfo/logback-dev
Jeff Wartes (JIRA | 16 Jul 16:21 2015
Picon

[JIRA] (LOGBACK-898) AsyncAppender should be configurable to never block

Jeff Wartes commented on LOGBACK-898

Thanks Gareth, good luck with the pull request!

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
Espen A. Fossen | 15 Jul 22:24 2015
Picon

JsonLayout for logback-access


Hi

I have been working on an JsonLayout for logback-access in the
logback-contrib repo. Making it possible to log an IAccessEvent to json.

It is built along the same structure as the JsonLayout from
ch.qos.logback.contrib:logback-json-classic.

To get some JUnit tests working I have added
ch.qos.logback:logback-access:tests as a test dependency. This requires
bumping the logback version to 1.1.3 for the whole logback-contrib repo.

Repo with the new JsonLayout can be reviewed here:

https://github.com/espenaf/logback-contrib

I have also created a demo for showing the actual Json logging to
console using some pages and jetty-maven-plugin. This can be
checked out here:

https://github.com/espenaf/logback-access-json-test

Looking for some feedback, and a suggestion on how to proceed for
getting this committed.

Regards,
Espen Fossen
Gareth Davis (JIRA | 14 Jul 14:53 2015
Picon

[JIRA] (LOGBACK-898) AsyncAppender should be configurable to never block

Gareth Davis commented on LOGBACK-898

We've just been bitten by this blocking in AsyncAppender. I've applied Jeff's patch, with a bit of tidying up and added some documentation https://github.com/ExpediaInc/logback/commit/9b74f9969d2bcff456e4d473815f868921e5f41e

I'm just trying to sort out permission to sign the CLA from our legal dept before raising a merge rq.

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
daniel.ruiqing.wang (JIRA | 14 Jul 11:57 2015
Picon

[JIRA] (LOGBACK-1091) Error occur when parsing logback.xml if the logback.xml declared external entities

STR:

1. set up the slf4j + logback as document says.
2. write a "Hello World" use the logback.xml. NOTE: the common.ent, common.body.ent are put in the same location with logback.xml.
3. run the program and the error message will show.

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
daniel.ruiqing.wang (JIRA | 14 Jul 11:51 2015
Picon

[JIRA] (LOGBACK-1091) Error occur when parsing logback.xml if the logback.xml declared external entities

Please give me feedback as soon as possible. For this has blocked my job. Thanks.

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
daniel.ruiqing.wang (JIRA | 14 Jul 11:51 2015
Picon

[JIRA] (LOGBACK-1091) Error occur when parsing logback.xml if the logback.xml declared external entities

Issue Type: Bug
Affects Versions: 1.1.3
Assignee: Logback dev list
Attachments: common.body.ent, common.ent, logback.xml
Components: logback-classic, logback-core
Created: 14/Jul/15 11:50 AM
Description:

An exception occur saying the external entity file could not be found even actually the file put in the correct path. I try to parse the logback.xml with w3c dom. the xml could be parsed. that means the path of the external entity file is correct.

Exception message:

Failed to auto configure default logger context
Reported exception:
ch.qos.logback.core.joran.spi.JoranException: Problem parsing XML document. See previously reported errors.
at ch.qos.logback.core.joran.event.SaxEventRecorder.recordEvents(SaxEventRecorder.java:67)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:134)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49)
at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:77)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:152)
at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:141)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:120)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:331)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:283)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:304)
at com.kingland.independence.Test.main(Test.java:9)
Caused by: org.xml.sax.SAXException: Stopping after fatal error: File "common.ent" not found.
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1245)
at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalEntity(DefaultEntityHandler.java:780)
at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromParameterEntity(DefaultEntityHandler.java:703)
at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromEntity(DefaultEntityHandler.java:588)
at org.apache.xerces.framework.XMLDTDScanner.scanDecls(XMLDTDScanner.java:1498)
at org.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl(XMLDTDScanner.java:1123)
at org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDocumentScanner.java:2145)
at org.apache.xerces.framework.XMLDocumentScanner.access$0(XMLDocumentScanner.java:2100)
at org.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispatch(XMLDocumentScanner.java:831)
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:392)
at ch.qos.logback.core.joran.event.SaxEventRecorder.recordEvents(SaxEventRecorder.java:61)
... 13 more
17:36:36,538 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
17:36:36,538 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback-test.xml] at file:/C:/Development/Hub/Master/Independence/Independence/webApplication/WEB-INF/classes/logback-test.xml
17:36:36,881 |-ERROR in ch.qos.logback.core.joran.event.SaxEventRecorder <at> 2c54366 - XML_PARSING - Parsing fatal error on line 0 and column 0 org.xml.sax.SAXParseException; systemId: ; lineNumber: 0; columnNumber: 0; File "common.ent" not found.
at org.xml.sax.SAXParseException: File "common.ent" not found.
at at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1219)
at at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalEntity(DefaultEntityHandler.java:780)
at at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromParameterEntity(DefaultEntityHandler.java:703)
at at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromEntity(DefaultEntityHandler.java:588)
at at org.apache.xerces.framework.XMLDTDScanner.scanDecls(XMLDTDScanner.java:1498)
at at org.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl(XMLDTDScanner.java:1123)
at at org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDocumentScanner.java:2145)
at at org.apache.xerces.framework.XMLDocumentScanner.access$0(XMLDocumentScanner.java:2100)
at at org.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispatch(XMLDocumentScanner.java:831)
at at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
at at javax.xml.parsers.SAXParser.parse(SAXParser.java:392)
at at ch.qos.logback.core.joran.event.SaxEventRecorder.recordEvents(SaxEventRecorder.java:61)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:134)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49)
at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:77)
at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:152)
at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:141)
at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:120)
at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:331)
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:283)
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:304)
at at com.kingland.independence.Test.main(Test.java:9)

-----------------------------------------------------------------------------------------

My test code:

package com.kingland.independence;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

public class Test {

public static void main(String[] args) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse("C:\\Development\\Hub\\Master\\Independence\\Independence\\webApplication\\WEB-INF\\classes
logback.xml");
NodeList nodes = doc.getElementsByTagName("pattern");
for (int i = 0; i < nodes.getLength(); i++)

{ Node node = nodes.item(i); System.out.println(node.getFirstChild().getNodeValue()); }

}

}

-----------------------------------------------------------------------------------------

My logback.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration[
<!ENTITY % common SYSTEM "common.ent"> %common;
]>
<!-- used for BVT/UAT/PROD environment, will not include debug information
and print in console -->
<configuration scan="true">
<conversionRule conversionWord="crlf"
converterClass="org.owasp.security.logging.mask.CRLFConverter" />
<include resource="logback-common.xml" />
<appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%d

{&LOGGING_DATE_PATTERN; &LOGGING_TIME_PATTERN;} {&LOGGING_TIME_ZONE;}

[%thread] [%marker] %-5level %logger

{36}

throwable

{full}

- %crlf(%msg) %n</pattern>
</layout>
</appender>
<root level="INFO">
<appender-ref ref="Console" />
<appender-ref ref="IndyLogFile" />
</root>
</configuration>

Environment:

jdk 7u67, slf4j1.1.12

Project: logback
Priority: Blocker
Reporter: daniel.ruiqing.wang
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