PeopleTools and Lifecycle Management - PSFT (MOSC)

MOSC Banner

how to use log4j 2.x in peoplecode

Hi:

Product: PeopleTools 8.58.06

I'm trying to use log4j version 2 in AE people code. There are number of excellent tutorials on the web but they are dated and use log4j version 1.

Using some java tutorials, I was able to instantiate logger class, but subsequent writing to the log failed.

Here is what I have:

Local JavaObject &logger = GetJavaClass("org.apache.logging.log4j.LogManager").getLogger();

Local string &sText = "Hello from a PeopleCode configured logger";

&logger.debug(&sText);


Error message:

Calling Java org.apache.logging.log4j.Logger.debug: more than one overload matches.

This makes sense as Java Doc has a lot of method overloads and it seems that it requires an object definition, in this case a String. I don't know how to provide that.

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center