enable the additional PXs logging in Agile

Dear All,

I am new to agile, need to enable the additional PXs logging in Agile. Please let me know, how to enable this.

Thanks
Agile User Asked on January 10, 2019 in Others,   Tools.
Add Comment
4 Answer(s)

Hi Sai,

What kind of PX you are writing.  You can use log4j to generate logs as per your wish. Sharing a quick snippet from my code.  You can place it before your  ActionResult method and test.

public static Logger logger = null;

static {
try {

InputStream ins = YourJavaClassName.class .getResourceAsStream(“/properties/Log4j_MyPX.xml”);

            new DOMConfigurator().doConfigure(ins, LogManager.getLoggerRepository());
          logger = Logger.getLogger(YourJavaClassName.class);
}
}

Regards,
Arif

Agile Angel Answered on January 10, 2019.
Add Comment

Hi Arif,

Thank you for the response.

3rd party PX’s are configured in Agile but now need to enable the additional logging for existing PX’s for to monitor the transaction flow of JARS.

Thanks,
Sai

Agile User Answered on January 10, 2019.
Add Comment

You are implying that existing PXs are configured without loggers or SOPs or you need additional logging apart from log4j. If the later to be true then i suggest going to
Administration >> Logging Configuration and see if you can use additional logging option.  Note, these settings gives you logs based on the Jars on Core-APIs not sure how much they will help you on custom PX.

Agile Angel Answered on January 11, 2019.
Add Comment

If you want a log specific to your PX, then you have to write a Java module that will insert your  log4j logger into the existing A9 logger context.

In 9.3.4, A9 is using log4j version 1, but in 9.3.6, I found out that it’s using the log4j 2.  The Apache log4j 2 content showing the “how to” programmatically modify existing logger context is not correct.  You will have to use .withxxx() fluid methods to create a new logger and insert insert if the A9 logger context, while making sure that you do not create loggers that write duplicate entries to a single RollingFileAppender

Sorry if to high level, but what I wrote is not for public, but company proprietary content

And finally, if you setup a px to work using log4j 2 framework and leave a jar file under …/extensions folder => it MAY cause existing PXs that use log4j to FAIL.

Agile Talent Answered on March 23, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.