logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <ralph.go...@dslextreme.com>
Subject Re: How to make all loggers async when run war file?
Date Fri, 09 Oct 2015 16:11:41 GMT
Normally you want to create a setenv.bat or setting.sh (depending on your OS) and “set”
or “export” CATALINA_OPTS to include all your JVM settings.  For example, on a Unix system
you would do something like:

export CATALINA_OPTS=“-DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
-Xms=1024m -Xmx=1024m -XX:MaxPermSize=256m”’

The Xmx, Xms and MaxPermSize are just there to illustrate how you provide multiple settings
to Tomcat.


> On Oct 9, 2015, at 8:50 AM, Remko Popma <remko.popma@gmail.com> wrote:
> Hi Dylan,
> I did a quick google search on "system properties tomcat".
> From https://tomcat.apache.org/tomcat-6.0-doc/config/index.html
> All system properties are available including those set using the -D syntax,
> those automatically made available by the JVM and those configured in the
> $CATALINA_BASE/conf/catalina.properties file.
> Also relevant:
> http://wiki.apache.org/tomcat/HowTo#Can_I_set_Java_system_properties_differently_for_each_webapp.3F
> On Fri, Oct 9, 2015 at 1:41 PM, Strong Su <lovelosew@gmail.com> wrote:
>> Hello everyone,
>> I'm testing log4j2 performance on our own projects. And I prepare to add
>> -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
>> to make all loggers async.
>> But I need to upload war file to the server.
>> I get the war file through "maven build" in IntelliJ and I'm using tomcat6.
>> Does the war file include the vm arguments?
>> If not, do I need to change catalina.sh in tomcat6 to add a JAVA_OPTS?
>> Because making all loggers async will get a better performance as website
>> says, I prefer to add vm arguments rather than change log4j2.xml.
>> Thank you.
>> Best regards,
>> Dylan Su

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message