Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

tLog4j, tInitLog4j : How to set max size and file name pattern?

Highlighted
Four Stars

tLog4j, tInitLog4j : How to set max size and file name pattern?

Hi Master,
i need to use log4j in TOS-DI and found component tLog4j, tInitLog4j and tLog4JCatch.
i have downloaded the example : ExampleLog4j
In this example, the configuration is (in log4j.xml):
<appender name="DailyFileAppender" class="org.apache.log4j.DailyRollingFileAppender">
    <param name="DatePattern" value="'.'yyyy-MM-dd"/>
    <param name="File" value="/test/logs_test.log"/>
    <param name="Append" value="true"/>
    <layout class="org.apache.log4j.PatternLayout">
        <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p %c{2} - %m%n"/>
    </layout>
    </appender>

if i want to set :
1. Max size of each log file is : 1Mb
2. Daily Rolling, if the date changed, it will create new log file
2. Log file name pattern : app_%d{yyyyMMdd}_%i.log (where i is sequential number if more than 1 log file created in a day).
How can i do this?
Thank you and best regards,
Highlighted
Moderator

Re: tLog4j, tInitLog4j : How to set max size and file name pattern?

Hi,
tLog4j, tInitLog4j, tLog4jCatch are custom components developed by Talend Community user and shared on Talend Exchange.
You'd better contact to the author bcourtine directly.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
Four Stars

Re: tLog4j, tInitLog4j : How to set max size and file name pattern?

Hi xdshi,
Thank you for you advice. i have sent him an email and still waiting for his response.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog