Skip to main content
6-Contributor
December 4, 2023
Solved

How to propagate custom properties to log4jMethodServer file from a property file in Windchill 12.1

  • December 4, 2023
  • 1 reply
  • 1019 views

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.

Best answer by HelesicPetr

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

 

 

1 reply

HelesicPetr
22-Sapphire II
22-Sapphire II
December 4, 2023

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

 

 

6-Contributor
December 21, 2023

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.