cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
533
Views
0
Helpful
1
Replies

Topic: Calling Log4j in CVP Audium java class

Anil Kumar
Level 1
Level 1

Hi

I am working on building a java class on CVP studio which should have separate log file using log4j I have complied the code and tested without CVP audium library and it is generating the logs.  However when I calling class using Action Element it not generating any logs.  Not sure where things are missing.   Can any one help me on this?

Thanks and Regards

Anil Kumar.

1 Reply 1

Mostafa_Shawky
Level 1
Level 1

Dear Anil,

Could you try to add below code for Log4j initiation in  application start class [StartApplicationInterface]

static {
try {
URL classLoadingPath = OnCCBStart.class.getClassLoader().getResource("log4j.xml");
DOMConfigurator.configure(classLoadingPath);
} catch (Exception e) {
// ignore
}
}
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: