Wednesday, September 29, 2010

Suppress logback initialisation messages

Recently I noticed logback logging lots of joran messages, I'm sure it just started happening one day.

With a little playing around I believe that the messages are a symptom of the element deprecation. If you replace the layouts with the correct tags the messages go away.

I used to see this

00:52:57,820 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
00:52:57,820 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
00:52:57,821 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/home/michael/src/stickycode/trunk/net.stickycode.examples/sticky-example-mockwire/target/classes/logback.xml]
00:52:57,954 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
00:52:57,962 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
00:52:57,971 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
00:52:58,016 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Pushing component ...
...


But by changing


<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>info</level>
</filter>
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%d{yyyy-MM-dd} %d{HH:mm:ss} %.-1level %thread %logger{36}: %m%n</Pattern>
</layout>
</appender>



to


<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>info</level>
</filter>
<encoder>
<pattern>%d{yyyy-MM-dd} %d{HH:mm:ss} %.-1level %thread %logger{36}: %m%n</pattern>
</encoder>
</appender>


All the joran/logback messages have disappeared. Yay.

Monday, September 20, 2010

Subversion, kwallet and eclipse hangs

I noticed recently that subversion had added kwallet support, awesome.

But it makes eclipse hang if you use javahl with subclipse and most like other integrations.

There are two possible solutions that i've found

1) use svnkit with subclipse

2)Or you can tell svn command line to use a different config, eclipse will store the password encrypted as well but thats ok as long as its not plain text.

I just copied my .subversion/ to .subversion-cli and added an alias to .bashrc

alias svn='svn --config-dir ~/.subversion-cli'