<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using log4j under windchill 12 in Windchill Customization</title>
    <link>https://community.ptc.com/t5/Windchill-Customization/Using-log4j-under-windchill-12/m-p/807466#M2977</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.ptc.com/t5/user/viewprofilepage/user-id/298476"&gt;@Norbert1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I had trouble that all parameters were not set. So Try to set all lines as I showed in my example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example I had to add following (I can not see it in your example)&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;appender.IntegrationAVAppender.policies.type = Policies
appender.IntegrationAVAppender.policies.midnight.type = SizeBasedMidnightTriggeringPolicy
appender.IntegrationAVAppender.policies.midnight.size=9MB
appender.IntegrationAVAppender.strategy.type = DefaultRolloverStrategy
appender.IntegrationAVAppender.strategy.max = 2147483647&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;also remove a line CreateOnDemand=true&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PetrH&lt;/P&gt;</description>
    <pubDate>Mon, 18 Jul 2022 12:10:39 GMT</pubDate>
    <dc:creator>HelesicPetr</dc:creator>
    <dc:date>2022-07-18T12:10:39Z</dc:date>
    <item>
      <title>Using log4j under windchill 12</title>
      <link>https://community.ptc.com/t5/Windchill-Customization/Using-log4j-under-windchill-12/m-p/807227#M2974</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I want to define a custom log file in Windchill 12, where I want to log messages into instead of into &lt;EM&gt;&lt;STRONG&gt;MethodServerLog&lt;/STRONG&gt;&lt;/EM&gt;-file.&lt;/P&gt;&lt;P&gt;The message-level should be given as INFO.&lt;/P&gt;&lt;P&gt;I tried the following changes in &lt;EM&gt;&lt;STRONG&gt;log4jMethodServer.properties&lt;/STRONG&gt;&lt;/EM&gt;:&lt;/P&gt;&lt;PRE&gt;...&lt;BR /&gt;appender.zfLogFile.type = RollingFile&lt;BR /&gt;appender.zfLogFile.name = zfLogFile&lt;BR /&gt;appender.zfLogFile.createOnDemand = true&lt;BR /&gt;appender.zfLogFile.fileName = ${sys:wt.logs.dir}/zf/zf-${sys:wt.jvm.startTime.formatted.short}-${sys:wt.jvm.id}-log4j.log&lt;BR /&gt;appender.zfLogFile.filePattern = ${sys:wt.logs.dir}/zf/zf-${sys:wt.jvm.startTime.formatted.short}-${sys:wt.jvm.id}-log4j.log.%d{yyyy-MM-dd}_%i&lt;BR /&gt;appender.zfLogFile.layout.type = PatternLayout&lt;BR /&gt;appender.zfLogFile.layout.alwaysWriteExceptions = false&lt;BR /&gt;appender.zfLogFile.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS}{${timeZone}} %-5p [%t] %c %X{user} - %m%ex%n&lt;BR /&gt;logger.extLogger.name=zfLogFile&lt;BR /&gt;logger.extLogger.level=INFO&lt;BR /&gt;logger.extLogger.additivity=false&lt;BR /&gt;...&lt;/PRE&gt;&lt;P&gt;But this doesn't work, the file under &lt;EM&gt;&lt;STRONG&gt;...\logs\zf\&amp;lt;filename&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt; is not created.&lt;/P&gt;&lt;P&gt;Only log.error(...) messages are logged in the &lt;EM&gt;&lt;STRONG&gt;MethodServerLog&lt;/STRONG&gt;&lt;/EM&gt;-File.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any hint.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Norbert&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 14:09:42 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Windchill-Customization/Using-log4j-under-windchill-12/m-p/807227#M2974</guid>
      <dc:creator>Norbert1</dc:creator>
      <dc:date>2024-03-15T14:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using log4j under windchill 12</title>
      <link>https://community.ptc.com/t5/Windchill-Customization/Using-log4j-under-windchill-12/m-p/807255#M2975</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.ptc.com/t5/user/viewprofilepage/user-id/298476"&gt;@Norbert1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to define reference for logger to appender.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;logger.IntegrationAV.appenderRef.IntegrationAVAppender.ref=IntegrationAVAppender&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is example which works:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;logger.IntegrationAV.name=cz.aveng.IntegrationAV
logger.IntegrationAV.level=TRACE

logger.IntegrationAV.appenderRef.IntegrationAVAppender.ref=IntegrationAVAppender

appender.IntegrationAVAppender.type = RollingFile
appender.IntegrationAVAppender.name = IntegrationAVAppender
appender.IntegrationAVAppender.fileName = ${sys:wt.logs.dir}/IntegrationAV-${sys:wt.jvm.startTime.formatted.short}-${sys:wt.jvm.id}-log4j.log
appender.IntegrationAVAppender.filePattern = ${sys:wt.logs.dir}/IntegrationAV-${sys:wt.jvm.startTime.formatted.short}-${sys:wt.jvm.id}-log4j.log.%d{yyyy-MM-dd}_%i
appender.IntegrationAVAppender.layout.type = PatternLayout
appender.IntegrationAVAppender.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS}{${timeZone}} %-5p [%t] %c - %m%ex%n
appender.IntegrationAVAppender.policies.type = Policies
appender.IntegrationAVAppender.policies.midnight.type = SizeBasedMidnightTriggeringPolicy
appender.IntegrationAVAppender.policies.midnight.size=9MB
appender.IntegrationAVAppender.strategy.type = DefaultRolloverStrategy
appender.IntegrationAVAppender.strategy.max = 2147483647&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HelesicPetr_0-1657890610563.png" style="width: 400px;"&gt;&lt;img src="https://community.ptc.com/t5/image/serverpage/image-id/60104i260EACBAE3025700/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HelesicPetr_0-1657890610563.png" alt="HelesicPetr_0-1657890610563.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 13:11:27 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Windchill-Customization/Using-log4j-under-windchill-12/m-p/807255#M2975</guid>
      <dc:creator>HelesicPetr</dc:creator>
      <dc:date>2022-07-15T13:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using log4j under windchill 12</title>
      <link>https://community.ptc.com/t5/Windchill-Customization/Using-log4j-under-windchill-12/m-p/807464#M2976</link>
      <description>&lt;P&gt;Hi Petr,&lt;/P&gt;&lt;P&gt;thanks for your answer.&lt;/P&gt;&lt;P&gt;I tried it in my environment, see my entries in&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;log4jMethodServer.properties&lt;/STRONG&gt;&lt;/EM&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;...&lt;BR /&gt;appender.zfLogFile.type = RollingFile&lt;BR /&gt;appender.zfLogFile.name = zfLogFile&lt;BR /&gt;appender.zfLogFile.createOnDemand = true&lt;BR /&gt;appender.zfLogFile.fileName = ${sys:wt.logs.dir}/zf/zf-${sys:wt.jvm.startTime.formatted.short}-${sys:wt.jvm.id}-log4j.log&lt;BR /&gt;appender.zfLogFile.filePattern = ${sys:wt.logs.dir}/zf/zf-${sys:wt.jvm.startTime.formatted.short}-${sys:wt.jvm.id}-log4j.log.%d{yyyy-MM-dd}_%i&lt;BR /&gt;appender.zfLogFile.layout.type = PatternLayout&lt;BR /&gt;appender.zfLogFile.layout.alwaysWriteExceptions = false&lt;BR /&gt;appender.zfLogFile.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS}{${timeZone}} %-5p [%t] %c %X{user} - %m%ex%n&lt;BR /&gt;&lt;BR /&gt;logger.ext.level=INFO&lt;BR /&gt;logger.ext.name=ext&lt;BR /&gt;logger.ext.additivity=true&lt;BR /&gt;logger.ext.appenderRef.zfLogFile.ref=zfLogFile&lt;BR /&gt;...&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;--&amp;gt; but it doesn't work, the custom log-file is not created !&lt;/P&gt;&lt;P&gt;Do you see anything wrong in my configuration?&lt;/P&gt;&lt;P&gt;Any hint would be helpful.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Norbert&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 12:07:20 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Windchill-Customization/Using-log4j-under-windchill-12/m-p/807464#M2976</guid>
      <dc:creator>Norbert1</dc:creator>
      <dc:date>2022-07-18T12:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using log4j under windchill 12</title>
      <link>https://community.ptc.com/t5/Windchill-Customization/Using-log4j-under-windchill-12/m-p/807466#M2977</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.ptc.com/t5/user/viewprofilepage/user-id/298476"&gt;@Norbert1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I had trouble that all parameters were not set. So Try to set all lines as I showed in my example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example I had to add following (I can not see it in your example)&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;appender.IntegrationAVAppender.policies.type = Policies
appender.IntegrationAVAppender.policies.midnight.type = SizeBasedMidnightTriggeringPolicy
appender.IntegrationAVAppender.policies.midnight.size=9MB
appender.IntegrationAVAppender.strategy.type = DefaultRolloverStrategy
appender.IntegrationAVAppender.strategy.max = 2147483647&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;also remove a line CreateOnDemand=true&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PetrH&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 12:10:39 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Windchill-Customization/Using-log4j-under-windchill-12/m-p/807466#M2977</guid>
      <dc:creator>HelesicPetr</dc:creator>
      <dc:date>2022-07-18T12:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using log4j under windchill 12</title>
      <link>https://community.ptc.com/t5/Windchill-Customization/Using-log4j-under-windchill-12/m-p/807468#M2978</link>
      <description>&lt;P&gt;&lt;a href="https://community.ptc.com/t5/user/viewprofilepage/user-id/298476"&gt;@Norbert1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additional advice&lt;/P&gt;
&lt;P&gt;Copy my example with all lines and change names of appender and log name as you need.&lt;/P&gt;
&lt;P&gt;I has to work &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;PetrH&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 12:14:05 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Windchill-Customization/Using-log4j-under-windchill-12/m-p/807468#M2978</guid>
      <dc:creator>HelesicPetr</dc:creator>
      <dc:date>2022-07-18T12:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using log4j under windchill 12</title>
      <link>https://community.ptc.com/t5/Windchill-Customization/Using-log4j-under-windchill-12/m-p/807472#M2979</link>
      <description>&lt;P&gt;Thank you very much - now it works.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 12:22:51 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Windchill-Customization/Using-log4j-under-windchill-12/m-p/807472#M2979</guid>
      <dc:creator>Norbert1</dc:creator>
      <dc:date>2022-07-18T12:22:51Z</dc:date>
    </item>
  </channel>
</rss>

