enable the additional PXs logging in Agile
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;
InputStream ins = YourJavaClassName.class .getResourceAsStream(“/properties/Log4j_MyPX.xml”);
new DOMConfigurator().doConfigure(ins, LogManager.getLoggerRepository());
logger = Logger.getLogger(YourJavaClassName.class);
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.
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.