Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi Team, Can you please help me to propagate custom properties to log4jMethodServer file from a property file? I tried with declarations.xconf file to refer a property file, and xconfmanager -p to propagate values to log4jMethodServer file. But it didn't work.
Solved! Go to Solution.
Hi @AK_10341824
do you define the target file for the properties?
What exactly is the log4jMethodServer file?
usually if tou want to add a properties from own xconf file you should add a reference to that file in site.xconf declaration.xconf is not bad place where to use the declaration but I would advice to use site.xconf
you can create own file with definition and add a reference in site.xconf
<ConfigurationRef xlink:href="myCustom.xconf"/>
and place the file to the Windchill folder where the site.xconf is placed.
example of own file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configuration
SYSTEM "xconf.dtd">
<Configuration xmlns:xlink="http://www.w3.org/1999/xlink">
<Property name="logger.Integration.name"
overridable="true"
targetFile="codebase/WEB-INF/log4jMethodServer.properties"
value="cz.aveng.Integration"/>
<Property name="logger.Integration.level"
overridable="true"
targetFile="codebase/WEB-INF/log4jMethodServer.properties"
value="DEBUG"/>
</Configuration>
PetrH
Hi @AK_10341824
do you define the target file for the properties?
What exactly is the log4jMethodServer file?
usually if tou want to add a properties from own xconf file you should add a reference to that file in site.xconf declaration.xconf is not bad place where to use the declaration but I would advice to use site.xconf
you can create own file with definition and add a reference in site.xconf
<ConfigurationRef xlink:href="myCustom.xconf"/>
and place the file to the Windchill folder where the site.xconf is placed.
example of own file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configuration
SYSTEM "xconf.dtd">
<Configuration xmlns:xlink="http://www.w3.org/1999/xlink">
<Property name="logger.Integration.name"
overridable="true"
targetFile="codebase/WEB-INF/log4jMethodServer.properties"
value="cz.aveng.Integration"/>
<Property name="logger.Integration.level"
overridable="true"
targetFile="codebase/WEB-INF/log4jMethodServer.properties"
value="DEBUG"/>
</Configuration>
PetrH
Hi @HelesicPetr, I tried with declaration.xconf earlier, it was not propagating the property correctly. Later used site.xconf. From site.xconf used configurationRef for the target xconf file. It worked fine then.