KB Article #188664
How to change the size and number of Interchange CN, TE, B2B, EX and REST logs files?
Problem
By default number of logs generated for each node is 10 files with a size of 10 MB.
It is possible to change the number of file and size from file /Interchange/conf/log4j2.xml.
Resolution
For example, if you want to have 20 files with a size of 30 MB.
Edit file /Interchange/conf/log4j2.xml :
<Appenders>
<RollingFile name="NodeAppender"
fileName="${sys:axway.cluster.logDir}/${sys:axway.cluster.node.name}.log"
filePattern="${sys:axway.cluster.logDir}/${sys:axway.cluster.node.name}.%i.log">
<!-- use this pattern to prevent CRLF injection. It will change \n and \r characters in the message to _ -->
<PatternLayout pattern="%d{DEFAULT} - %-5level [%t]%notEmpty{[P/EP: %X{EP_PARTNER}/%X{EP_NAME}]} (%c{1}) - %replace{%msg}{[\r\n]}{_}%n"/>
<!-- use this pattern to prevent CRLF injection. It will change \n and \r characters in the message to _ and in the stack traces in to | -->
<!--<PatternLayout alwaysWriteExceptions="false" pattern="%d{DEFAULT} - %-5level [%t]%notEmpty{[P/EP: %X{EP_PARTNER}/%X{EP_NAME}]} (%c{1}) -
%replace{%msg}{[\r\n]}{_} %replace{%throwable}{[\r\n]{1,2}}{|}%n"/>-->
<!-- use this pattern to ignore CRLF injection. -->
<!--<PatternLayout pattern="%d{DEFAULT} - %-5level [%t]%notEmpty{[P/EP: %X{EP_PARTNER}/%X{EP_NAME}]} (%c{1}) - %enc{%msg}%n"/>-->
<Policies>
<SizeBasedTriggeringPolicy size="30 MB"/>
</Policies>
<DefaultRolloverStrategy max="20"/>
</RollingFile>
A restart of B2Bi is required to take the modification into account.