Question
Salame
Last activity: 12 Aug 2016 9:25 EDT
Logging in Java
Hello,
I noticed the use of oLog syntax in Java blocks of activities, but, I want to know where logging will be written? I checked catalina logs, but, I didn't find any. Could you please check?
Thanks,
Rosy
***Updated by moderator: Lochan to add Categories***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
IN
Hi Rosy,
I believe you mean setting the logging level for the particular activity in PRPC.
It should be in Pega Rules log only.
Thankyou
Salame
Hi kumar,
I wanr to use logging inside Java, not, inside my activity.
Regards,
Rosy
Pegasystems
IN
The logging goes to PegaRULES log file. You can find the log file links in designer studio (Pega 7 platform) at
Designer Studio -> System -> Operations -> Logs
Note that the default log level is ALERT and depending on what logging level is set for a certain activity, the logged message may or may not make it to the file.
The platform uses Log4J to do the logging and appenders are controlled by prlogging.xml file
PEG
IN
You can find the logs in PegaRules.
oLog.error and oLog.infoForced will print automatically. Incase of oLog.debug you need to enable debug loggers .
-
Raghavender Reddy Lankapothu Pritam Rajendra Lunawat
Salame
Hello Rajiv,
I already used logging in an activitiy using Log-Message Step and putting Level = Error. But, I want to debug my java code, I cannot use System.out.println. How to use logging inside a Java block? It is using log4j as well?
Thnaks,
Rosy
Salame
Thanks :)
Rosy
PEG
IN
Hi Rosy,
You can use oLog.error(), oLog.infoForced inside a java code to print the logs as I explained in my previous response.
Pegasystems
IN
If your java code is a step in an activity then that activity should be set at debug logging level to see the debug statements. Similarly if the java code is in a Rule-Utility-Function, then that function should be at debug logging level and so on.