Your Log4J file should work, as long as Usergrid and Log4J can find it.
What I usually do is to add something like the following to my Tomcat's
CATALINA_OPTS variable:
-Dlog4j.configuration=file:/usr/share/tomcat7/lib/log4j.properties
Hope that helps...
Dave
On Fri, Jul 22, 2016 at 7:51 AM Thành Vũ Trung <[email protected]>
wrote:
> Hi all,
> Everybody know how to change log level to ERROR in production environment?
> *My log4j.properties in /lib folder:*
>
> # output messages into a rolling log file as well as stdout
> log4j.rootLogger=ERROR,stdout
>
> # stdout
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%d %p (%t) [%c] - %m%n
>
> log4j.logger.org.apache.usergrid=INFO
>
> log4j.logger.me.prettyprint.cassandra.hector.TimingLogger=WARN
> log4j.logger.org.apache.usergrid.rest.security.AllowAjaxFilter=WARN
> log4j.logger.me.prettyprint.hector.api.beans.AbstractComposite=ERROR
>
> *setenv.sh:*
>
>
>
>
>
>
>
> export
> LOGGING_CONFIG="-Dlog4j.configuration=file:///usr/share/tomcat7/lib/log4j.properties"
>
> export
> LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager"
>
> I have copy log4j lib as #1 on:
> http://stackoverflow.com/questions/19981503/log4j-configuration-does-not-work-on-tomcat
>
> After restart tomcat, cataliout.log until shows log INFO level...
> Pls help me resolve that.
> Thanks
> Thanh.
>