You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Andrew Pennebaker <ap...@42six.com> on 2013/12/05 17:27:45 UTC

Help hiding INFO messages from Apache MINA SSHD

I'm using Apache MINA SSHD for some unit tests, and all the INFO messages
it spits out are making it hard to see my own INFO messages. I came across
a helpful log4j.properties<https://code.google.com/p/gerrit/source/browse/gerrit-war/src/main/resources/log4j.properties?r=92cb0d213a4a522d782fec7c8144e9dd36f24898>in
project gerrit, and started writing my own file based on that.
Unfortunately, these settings are being ignored in my Maven project, and I
can't figure out why.

*`mvn test -Dlog4j.debug=true` shows my log4j.properties being loaded
after the first sshd INFO message, and once my settings are loaded, sshd
INFO messages are still printed.*

* I've tried setting the threshold to WARN.
* I've tried setting log4j.logger.org.apache.sshd.common to WARN.
* I've tried tried turning off log4j.logger.org.apache.sshd.common.
* I've tried using log4j.xml.
* I've tried writing configuration in src/main/resources/.
* I've tried writing configuration in src/test/resources/.

Any idea why this would happen?

-- 
Cheers,

Andrew Pennebaker
apennebaker@42six.com

Re: Help hiding INFO messages from Apache MINA SSHD

Posted by Andrew Pennebaker <ap...@42six.com>.
sshd-core is in Maven, and that's what I'm using.

http://search.maven.org/#artifactdetails%7Corg.apache.sshd%7Csshd-core%7C0.9.0%7Cjar


On Thu, Dec 5, 2013 at 5:24 PM, Barrie Treloar <ba...@gmail.com> wrote:

> On 6 December 2013 02:57, Andrew Pennebaker <ap...@42six.com> wrote:
> > I'm using Apache MINA SSHD for some unit tests, and all the INFO messages
> > it spits out are making it hard to see my own INFO messages. I came
> across
> > a helpful log4j.properties<
> https://code.google.com/p/gerrit/source/browse/gerrit-war/src/main/resources/log4j.properties?r=92cb0d213a4a522d782fec7c8144e9dd36f24898
> >in
> > project gerrit, and started writing my own file based on that.
> > Unfortunately, these settings are being ignored in my Maven project, and
> I
> > can't figure out why.
> >
> > *`mvn test -Dlog4j.debug=true` shows my log4j.properties being loaded
> > after the first sshd INFO message, and once my settings are loaded, sshd
> > INFO messages are still printed.*
> >
> > * I've tried setting the threshold to WARN.
> > * I've tried setting log4j.logger.org.apache.sshd.common to WARN.
> > * I've tried tried turning off log4j.logger.org.apache.sshd.common.
> > * I've tried using log4j.xml.
> > * I've tried writing configuration in src/main/resources/.
> > * I've tried writing configuration in src/test/resources/.
> >
> > Any idea why this would happen?
>
> Mina SSHD is not in the central repository.
> So I assume that you have downloaded this and start it up manually.
>
> Pulling down the binaries I can see that Mina SSHD uses slf4j and the
> slf4j-simple-1.6.4.jar binding.
> According to http://www.slf4j.org/manual.html#swapping
> "Binding for Simple implementation, which outputs all events to
> System.err. Only messages of level INFO and higher are printed. This
> binding may be useful in the context of small applications."
>
> You will need to swap this binding with the one you want.
> If you just want to ignore the Mina SSHD messages then use
> slf4j-nop-1.7.5.jar.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Cheers,

Andrew Pennebaker
apennebaker@42six.com

Re: Help hiding INFO messages from Apache MINA SSHD

Posted by Barrie Treloar <ba...@gmail.com>.
On 6 December 2013 02:57, Andrew Pennebaker <ap...@42six.com> wrote:
> I'm using Apache MINA SSHD for some unit tests, and all the INFO messages
> it spits out are making it hard to see my own INFO messages. I came across
> a helpful log4j.properties<https://code.google.com/p/gerrit/source/browse/gerrit-war/src/main/resources/log4j.properties?r=92cb0d213a4a522d782fec7c8144e9dd36f24898>in
> project gerrit, and started writing my own file based on that.
> Unfortunately, these settings are being ignored in my Maven project, and I
> can't figure out why.
>
> *`mvn test -Dlog4j.debug=true` shows my log4j.properties being loaded
> after the first sshd INFO message, and once my settings are loaded, sshd
> INFO messages are still printed.*
>
> * I've tried setting the threshold to WARN.
> * I've tried setting log4j.logger.org.apache.sshd.common to WARN.
> * I've tried tried turning off log4j.logger.org.apache.sshd.common.
> * I've tried using log4j.xml.
> * I've tried writing configuration in src/main/resources/.
> * I've tried writing configuration in src/test/resources/.
>
> Any idea why this would happen?

Mina SSHD is not in the central repository.
So I assume that you have downloaded this and start it up manually.

Pulling down the binaries I can see that Mina SSHD uses slf4j and the
slf4j-simple-1.6.4.jar binding.
According to http://www.slf4j.org/manual.html#swapping
"Binding for Simple implementation, which outputs all events to
System.err. Only messages of level INFO and higher are printed. This
binding may be useful in the context of small applications."

You will need to swap this binding with the one you want.
If you just want to ignore the Mina SSHD messages then use slf4j-nop-1.7.5.jar.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org