Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Change/Override log4j log level at runtime

Hi,

Is there any way that default log4j level can be change/override  at run-time for job debugging in Talend Open Studio 6.5 .

Regards,
Jatinder Jawanda

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hello,

Could you please refer to this new feature jira issue:https://jira.talendforge.org/browse/TDI-31688 to see if it is what you are looking for?

Best regards

Sabrina

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Hello,

Could you please refer to this new feature jira issue:https://jira.talendforge.org/browse/TDI-31688 to see if it is what you are looking for?

Best regards

Sabrina

Anonymous
Not applicable
Author

Hi, 

you can create routine like 

package routines;

import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.core.config.Configurator;

public class ExtendedLogger {
    private static final Logger logger = LogManager.getRootLogger();
public static void changeRootLoggerLevel(String rootLevel) { Configurator.setAllLevels(logger.getName(), Level.getLevel(rootLevel)); } }

And you can call the method based on context variable . 

Cordially 
Mohamed