cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Travis errors, Was: 4.0 jenkins build failures
Date Mon, 18 Apr 2016 06:27:05 GMT
While we may consider Gradle separately from the logging issue, here are a few suggestions
regarding Maven...

"mvn --help" prints all options
"mvn -q" suppresses Maven's own logging. 

This leaves Cayenne's logging. To control that, we need to provide proper logging dependencies
in the "test" scope. E.g. add SLF4J-to-commons-loging bridge and Logback jars, and then configure
Logback to use a minimal prefix for each log line.

Also here is a completely different idea - maybe we can simply do "mvn ... > /tmp/log",
to prevent logging to console. Not sure how to retrieve that log from the Travis server though
in case we need to debug the builds.

Andrus

> On Apr 18, 2016, at 7:57 AM, Aristedes Maniatis <ari@maniatis.org> wrote:
> 
> I just wasted 45 minutes struggling with maven, but I've not managed to get it to quiet
logging. I tried all sorts of command line options like:
> 
> mvn verify -D -Dorg.apache.commons.logging.simplelog.defaultlog=warn
> 
> I put in a logging.properties with just ".level=WARN" and then tried to get surefire
to see it:
> 
> diff --git a/pom.xml b/pom.xml
> +                                               <property>
> +                                                       <name>java.util.logging.config.file</name>
> +                                                       <value>logging.properties</value>
> +                                               </property>
> 
> 
> But ultimately I can't make any dent in what the tests output to the console.
> 
> This is the point at which I start to think: "It'd be easier to just move to gradle."
> 
> Ari
> 
> 
> 
> On 31/03/2016 6:21pm, Andrus Adamchik wrote:
>> 
>>> On Mar 31, 2016, at 1:50 AM, Aristedes Maniatis <ari@maniatis.org> wrote:
>>> 
>>> Should we change most of CommonsJdbcEventLogger to DEBUG? For some reason the
whole thing is bound to INFO?
>>> 
>>> 	@Override
>>> 	public boolean isLoggable() {
>>> 		return logger.isInfoEnabled();
>>> 	}
>>> 
>>> 
>>> logQueryError() should be ERROR or at least WARN. Pretty much everything else
should be DEBUG.
>> 
>> Cayenne has always logged SQL at INFO level. And I'd like to have it on by default.
Turning it off for Jenkins (or your own apps) is not a problem - logger levels are configurable.
I am not doing it for other reasons:
>> 
>> 1. We often want SQL to be logged during tests for tracing purposes.
>> 2. I am not yet convinced Cayenne logs are the culprit here. Consider that these
builds are done with an empty local Maven repo, so Maven downloads a bunch of dependencies.
Take a look at raw logs on Travis. It is not yet clear SQL logs are the majority. 
>> 
>> So I'd like to play with it a bit, and see what we can trim without sacrificing clarity.
Long logger names and timestamps are the first candidates.
>> 
>> Andrus
>> 
> 
> -- 
> -------------------------->
> Aristedes Maniatis
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A


Mime
View raw message