ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Log4j logging not working on Liberty server with Web Viewer 14.0

book

Article ID: 237269

calendar_today

Updated On:

Products

Output Management Web Viewer

Issue/Introduction

I need help with setting up logging with log4j. The log file in /CAWVHOME/logs/web-wiever.log is always empty.  The messages are showing up in the job output, but not in the logs directory.

 

 

 

 

Environment

Release : 14.0

Component : Output Management Web Viewer

IBM WebSphere Liberty

Resolution

Workaround:


Add the following to the jvm.options file in the Liberty Server directory:

-Dlog4j.configurationFile=/your/CAWVHOME/config/log4j2.xml

Where /your/CAWVHOME/config/log4j2.xml is the path and name of the log4j2.xml file.

Recycle the Liberty Server for this change to be picked up.

With this change and the default log4j2.xml file that is distributed by Web Viewer r14 it will be writing to both the output and log file (/the /CAWVHOME/logs/web-viewer.log).