cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1100
Views
15
Helpful
5
Replies

Log4j2.xml equivalent configuration in Call Studio 12.5(1)a and above

Komal Tagdiwala
Cisco Employee
Cisco Employee

We have custom integration jars deployed in CVP that previously leveraged log4j1.x FileAppenders and such to allow for creation of individual LOG files for each integration. For example, integration A resulted in a dedicated integrationA.log file in addition to the regular activity log in CVP.

 

With the remediation for log4j2.x, we had to adapt to the log4j2.xml style approach where the log files to generate were configured in a dedicated log4j2.xml file. For example, a standalone Java program that wants to use log4j2.x for logging can have a log4j2.properties or log4j2.xml file. However, when attempting to deploy our retrofitted integrations, it is not obvious where to place the log4j2.xml file in CVP to guarantee individual log files for each integration.

 

I have been testing the setup on my local machine in Call Studio 12.5(1) a by creating a simple Call Flow that uses a custom jar, which uses a custom Action element and all that element does is log a simple message to a log file.

 

What I observed was that by default, CVP is still looking for a log4j.xml file under the AUDIUM_HOME\conf folder when I debug my Call Studio project and cannot find one. This is because in the log4j2.x world, we don't have a log4j.xml but rather, a log4j2.xml or log4j2.properties file; none of which are being detected by Call Studio.

 

See attached screenshot taken for the startup of my Call Studio application in debug mode.

 

I have tried placing log4j2.xml and log4j2.properties (hoping one of them will be detected) in several of the following locations but they are never recognized/picked up by the class loader upon startup and the log message from my application is simply dumped to the DEFAULT app.log file located under C:\Cisco\CallStudio\eclipse\plugins\com.audiumcorp.studio.debug.runtime\CATALINA_HOME\logs

 

The locations where I tried to dump the log4j2.xml and log4j2.properties file include the following:

1. C:\Cisco\CallStudio\eclipse\plugins\com.audiumcorp.studio.debug.runtime\AUDIUM_HOME\common\lib

2. C:\Cisco\CallStudio\eclipse\plugins\com.audiumcorp.studio.debug.runtime\AUDIUM_HOME\common\classes

3. C:\Cisco\CallStudio\eclipse\plugins\com.audiumcorp.studio.debug.runtime\CATALINA_HOME\common\classes

4. C:\Cisco\CallStudio\eclipse\plugins\com.audiumcorp.studio.debug.runtime\CATALINA_HOME\webapps\CVP\WEB-INF\lib

5. C:\Cisco\CallStudio\eclipse\plugins\com.audiumcorp.studio.debug.runtime\AUDIUM_HOME\conf

6. C:\Cisco\CallStudio\eclipse\plugins\com.audiumcorp.studio.debug.runtime\CATALINA_HOME\conf

 

I see that C:\Cisco\CallStudio\eclipse\plugins\com.audiumcorp.studio.debug.runtime\CATALINA_HOME\conf already ships with a log4j.xml file out-of-the-box and I am surprised that if I have patched my Call Studio with the log4j remediation patch available at https://www.cisco.com/web/software/280840592/159727/ReleaseNoteLog4jVulnerability_Callstudio_12.5.txt why would the product be using log4j.xml and not a log4j2.xml

 

Bottomline: While I have patched my CVP for log4j remediation, I have lost the ability to generate individual log files for each of my integration unless I can figure out where to place the log4j2.xml or log4j2.properties - whichever is being recognized by CVP as the configuration for my integrations.

 

Please help.

 

 

1 Accepted Solution

Accepted Solutions

Komal Tagdiwala
Cisco Employee
Cisco Employee

Managed to find the solution. The correct location is C:\Cisco\CVP\VXMLServer\Tomcat\webapps\CVP\WEB-INF\classes on the CVP Server.

 

You place the log4j2.xml file in the above location and the custom jars can create their custom log files as expected. 

 

Note though that while this works on the CVP server, the local Call Studio debugger just doesn't work the same way and for now, I have come to realize that for any of such testing, it would have to be on the CVP server as Call Studio debugger just wouldn't pickup the log4j2.xml from any location.

View solution in original post

5 Replies 5

Have you tried this on an actual CVP server, vs. doing it on Studio and testing with the debugger (if I'm following your post correctly), in case it behaves differently?

Thanks for the prompt response Bill but that is exactly the trial and error I am hoping to avoid on the CVP server because each time you put the file to any of these locations, you have to restart the services before testing. Not only that, I don't even know whether the CVP server is expecting an XML file or a properties file for log4j2.x implementation (log4j2.xml or log4j2.properties) and in which location.

 

I will still try on CVP server but was really hoping that someone has solved this problem before - deploying custom jar on CVP server and log4j2.x implementation for logging.

Komal Tagdiwala
Cisco Employee
Cisco Employee

Managed to find the solution. The correct location is C:\Cisco\CVP\VXMLServer\Tomcat\webapps\CVP\WEB-INF\classes on the CVP Server.

 

You place the log4j2.xml file in the above location and the custom jars can create their custom log files as expected. 

 

Note though that while this works on the CVP server, the local Call Studio debugger just doesn't work the same way and for now, I have come to realize that for any of such testing, it would have to be on the CVP server as Call Studio debugger just wouldn't pickup the log4j2.xml from any location.

Thank you for posting the solution.

Did you open a TAC case so that a defect can be opened with Cisco to address this issue in the future/fix that CVP ES that they deployed if it broke the debugger?

I did follow-up with TAC and they are in the process of confirming the defect.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: