From: Chris T. <chr...@gm...> - 2015-11-17 17:55:06
|
I notice that: <Property name="logs">${web:rootDir}/WEB-INF/logs</Property> works sensibly when eXist-db is run via war file within Tomcat 8; however, when I simply run via: ./bin/startup.sh just after ./build.sh all, then the logs end up in: ${web:rootDir}/logs/exist.log so it appears that the substitution is at least occurring within the Tomcat container. I haven’t tested the analogous configuration with jetty so I don’t know if the problem is peculiar to jetty or to the way that eXist-db is running “standalone”. ciao, Chris > On Nov 17, 2015, at 10:50 AM, Chris Tomlinson <chr...@gm...> wrote: > > Hi Adam, > > There seem to be two conditions: > > 1) absolute path is necessary; and > 2) it is necessary to include log4j-web-xxx.jar - > per https://logging.apache.org/log4j/2.x/manual/webapp.html > > Then logging appears to work except for the log path issue you filed LOG4J2-1050 which now has gone unassigned. > > ciao, > Chris > > >> On Nov 17, 2015, at 4:33 AM, Adam Retter <ad...@ex...> wrote: >> >> Chris, >> >> Have you tried specified the absolute path to the location you want >> your log files placed in log4j2.xml? You can just change this value: >> >> <Property name="logs">webapp/WEB-INF/logs</Property> >> >> There are known problems with log4j2 relative log file paths, I have >> an enhancement issue opened with the log4j project: >> >> https://issues.apache.org/jira/browse/LOG4J2-1050 >> >> See - https://github.com/eXist-db/exist/pull/637 >> >> On 16 November 2015 at 20:49, Chris Tomlinson >> <chr...@gm...> wrote: >>> Hi, >>> >>> I’m trying again to debug why the logging isn’t working in eXist-sdb 3.0RC1 >>> when run from war file in Tomcat 8. >>> >>> I am seeing the following in the catalina.out: >>> >>> 17535 [WARN] WebFactory: Could not find >>> /usr/local/indium/exist/apache-tomcat-8.0.12/webapps/exist/WEB-INF/log4j.xml >>> >>> and it appears this results from betterform-config.xml line 16-17: >>> >>> <property name="log4j.file" value="WEB-INF/log4j.xml" >>> description="the location of the log4j configuration file >>> relative to context"/> >>> >>> When I change to WEB-INF/log4j2.xml the warning no longer occurs. >>> >>> However, logging is still not happening in WEB-INF/logs :-( >>> >>> ciao, >>> Chris >>> >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Presto, an open source distributed SQL query engine for big data, initially >>> developed by Facebook, enables you to easily query your data on Hadoop in a >>> more interactive manner. Teradata is also now providing full enterprise >>> support for Presto. Download a free open source copy now. >>> http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140 >>> _______________________________________________ >>> Exist-development mailing list >>> Exi...@li... >>> https://lists.sourceforge.net/lists/listinfo/exist-development >>> >> >> >> >> -- >> Adam Retter >> >> eXist Developer >> { United Kingdom } >> ad...@ex... >> irc://irc.freenode.net/existdb > |