You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by "Jain, Saurabh" <sa...@alethelabs.com> on 2014/10/15 12:20:51 UTC

Shiro logs with log4j 2.0

Hi,

I am integrating shiro with a struts application using log4j 2.0 
deployed on Jboss server..
During application start-up, following logs are coming on console
"[org.apache.shiro.web.env.EnvironmentLoader] (MSC service thread 1-8) 
Starting Shiro environment initialization."

But, there are no logs generated during Authentication, I have done 
following -

 1.   Added Logger in log4j2.xml <Logger
    name="org.apache.shiro.realm.AuthenticatingRealm" level="trace"/>
 2. Added slf4j-log4j12 jar in classpath.

Also, tried replacing slf4j-log4j12 jar with slf4j-simple jar.

Any idea on what am I missing here.

-- 
Regards,
Saurabh


Re: Shiro logs with log4j 2.0

Posted by Tamas Cservenak <t....@gmail.com>.
slf4j-log4j supports log4j 1.x

For log4j2 you need this
http://logging.apache.org/log4j/2.0/log4j-slf4j-impl/index.html

Thanks,
~t~

On 15 Oct 2014 at 15:12:38 , Brian Demers (brian.demers@gmail.com) wrote:

This might be more of a general slf4j/log4j2 questions.

But, taking a guess, do you have any other slf4j jars on your classpath? 

On Wed, Oct 15, 2014 at 6:20 AM, Jain, Saurabh <sa...@alethelabs.com> wrote:
Hi,

I am integrating shiro with a struts application using log4j 2.0 deployed on Jboss server..
During application start-up, following logs are coming on console
"[org.apache.shiro.web.env.EnvironmentLoader] (MSC service thread 1-8) Starting Shiro environment initialization."

But, there are no logs generated during Authentication, I have done following -
 Added Logger in log4j2.xml <Logger name="org.apache.shiro.realm.AuthenticatingRealm" level="trace"/>
Added slf4j-log4j12 jar in classpath.
Also, tried replacing slf4j-log4j12 jar with slf4j-simple jar.

Any idea on what am I missing here.
 --  
Regards,
Saurabh



Re: Shiro logs with log4j 2.0

Posted by Brian Demers <br...@gmail.com>.
This might be more of a general slf4j/log4j2 questions.

But, taking a guess, do you have any other slf4j jars on your classpath?

On Wed, Oct 15, 2014 at 6:20 AM, Jain, Saurabh <sa...@alethelabs.com>
wrote:

>  Hi,
>
> I am integrating shiro with a struts application using log4j 2.0 deployed
> on Jboss server..
> During application start-up, following logs are coming on console
> "[org.apache.shiro.web.env.EnvironmentLoader] (MSC service thread 1-8)
> Starting Shiro environment initialization."
>
> But, there are no logs generated during Authentication, I have done
> following -
>
>    1.  Added Logger in log4j2.xml <Logger
>    name="org.apache.shiro.realm.AuthenticatingRealm" level="trace"/>
>    2. Added slf4j-log4j12 jar in classpath.
>
> Also, tried replacing slf4j-log4j12 jar with slf4j-simple jar.
> Any idea on what am I missing here.
>
> --
> Regards,
> Saurabh
>
>