How to Enable Debug Output For Job(Synchronize portfolio investments)
search cancel

How to Enable Debug Output For Job(Synchronize portfolio investments)

book

Article ID: 29109

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

To enable Portfolio Sync Job diagnostic profile logging the following procedure should be followed:

1. Make sure that the Portfolio Sync Job is not running.
2. If the user has ‘admin’ privileges, then access the logger configuration pages either from the CSA or the PPM application as follows:
CSA:
a.  If CSA is running and accessible, login.
b.  Click on the appropriate <server> link under the ‘Server’ list to get the properties page listing.
c.  Navigate to the ‘Logs’, ’Edit Configuration’ page.
APP:
a.  As an administrator user, login to the PPM application
b.  Type in the following url: <server>:<port>/niku/nu#action:security.logs
c.  Use the drop down ‘Logs’ tab to choose ‘Edit Configuration’ 
3. On the logger configuration page two appenders and two categories must be added to the logger configuration as follows:
Add the appenders: 
a.  In the appender section select the ‘STDOUT’ appender by checking the box next to it and click the ‘Copy Appender’ button, then click the ‘Save’ button.
b.  Change the name of the new appender ‘PFMHeader’.
c.  Change the file of the new appender to ../logs/pfmprofile.log
d.  Click the ‘Save’ button.
e.  In the appender section select the ‘STDOUT’ appender by checking the box next to it and click the ‘Copy Appender’ button, then click the ‘Save’ button.
f.  Change the name of the new appender ‘PFMProfile’.
g.  Change the file of the new appender to ../logs/pfmprofile.log
h.  Change the Conversion Pattern to be: ="%-5p %d{ISO8601} %m\r\n"
i.  Click the ‘Save’ button.
 
Add the categories:  
a.  In the categories section, click the ‘Add Category’ button. This will add a category to the bottom of the list with the name ‘com.niku’.
b.  Change the name by populating the ‘Other Name’ field with ‘portfolio.sync.header’
c.  Set the appender to the newly created ‘PFMHeader’ appender.
d.  Set the priority to ‘DEBUG’.
e.  Leave the ‘Additive’ checkbox unchecked.
f.  Click the ‘Save’ button.
g.  In the categories section, click the ‘Add Category’ button. This will add a category to the bottom of the list with the name ‘com.niku’.
h.  Change the name by populating the ‘Other Name’ field with ‘portfolio.sync.profile’
i.  Set the appender to the newly created ‘PFMProfile’ appender.
j.  Set the priority to ‘WARN.
k.  Leave the ‘Additive’ checkbox unchecked.
l.  Click the ‘Save’ button.
4. To start logging for the PFM Portfolio Synchronization Job change the priority for the ‘portfolio.sync.profile’ category to either ‘DEBUG’ or ‘TRACE’. The ‘TRACE’ priority will log more details regarding the operation of the PFM Portfolio Synchronization Job. 
5. If the PPM Application(app) Server and Background(bg) Server are not running, start them. If the bg server is already running you will need to restart it if the checkbox ‘Detect Log Configuration Changes Automatically’ is not checked in the logs configuration page.
6. Start the Portfolio Synchronization Job by selecting a portfolio in the PPM Application.  In the Content Editor page or Target Worksheet page, click on the ‘Sync Now’ button. Alternatively schedule the Job via the Jobs Scheduler pages in the PPM Application.
7. After the job has finished and profile logging is no longer desired, to disable logging, change the priority back to ‘WARN’  in the  ‘portfolio.sync.profile’ category. The same consideration for restarting the bg server will need to be adhered to if the logger configuration is not set to be automatically detected as described above.
8. To view the logged information from running of the PFM Portfolio Synchronization Job locate the output log file ‘bg-pfmprofile.log’ in the logs directory.
 
 

Resolution

It should look like the following:

After it runs, the BG logs show sample output run: