Orchestration Designer 7.1
Application: TestApp has ddlog4j.properties file set with different appenders.
Deployed the app to test/model with no issues. log for TestApp is TestApp.log and logging correctly.
Noticed when starting Tomcat and launching the application on developer workstation, make test call (Experience Portal points to my workstation) the TestApp.log starts but never logs anything more than one line.
This was not the experience before. Something triggered this and not sure what it is. Worried could happen in production. Need to investigate further.
In this scenario, it will use VPAppLogClient.log4j.properties as the main logging properties files and ignores ddlog4j.properties in the Application data directory.
If I start Tomcat local, go to Experience Portal and verify the application, THEN make a test call, the TestApp.log begins to log correctly as does the vpAppLogClient.log
I could do one of two things:
Use VPAppLogClient.log4j.properties and set all logging properties from ddlog4j.properties into VPAppLogClient.log4j.properties
or
Update ddlog4j.properties and set the VPAppLogClient.log4j.properties information into this file.
In this scenario, I have to rename or delete the file VPAppLogClient.log4j.properties so it does not load.
At this time, I prefer the second option as we typically have more control on updating the application and deploying that vs the VPAppLogClient.log4j.properties file we never have touched.
I tried moving the jar order in the app, but did not fix.
Achieving all this by using Log4j2 bridge method, keeping all existing code the same while adding the JVM parameter: -Dlog4j1.compatibility=true
and using the following jars:
log4j-1.2-api-2.23.1.jar
log4j-api-2.23.1.jar
log4j-core-2.23.1.jar
VPAppLogClient.log4j.properties details:
log4j.appender.VPAppClientLog=org.apache.log4j.Rol lingFileAppender
log4j.appender.VPAppClientLog.File=${LOG4J_DIR}/vpAppLogClient.log
Also note:
Original value in VPAppLogClient.log4j.properties had the appender named: VPAppLogClient
This had to be updated to VPAppClientLog (notice Client and Log are flipped. Any other name could be used except: VPAppLogClient)
By leaving the name as is, I would see this error in log file:
Caught exception try to determine the vpApLogClient log4j file path:
ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender
at com.avaya.vp.applog.client.VPAppLogClientBase.getS aveReportPath(VPAppLogClientBase.java:800) [VPAppLogClient_7.1.0.jar:
research showed this error could be when using .file= instead of uppercase .File= , but this was not the case in this situation. I simply renamed it originally to Test.Log and that fixed that issue.
I then retried the name and could duplicate the error, so used a name that was very similar to fix this.
Lastly, We do have two enviroments, One is OD7.1 which we are migrating from to OD8.1
we are using the same bridge jar files and using the original files that came with that version:
VPAppLogClient.log4j2.properties
VPAppLogClient_8.1.1.jar
VPAppLogClientWS_8.1.1.jar
this environment has no issues and working correctly.
Both running on Windows Server.
OD7.1 running with Tomcat version 7.0.x
Test / Model Servers running 7.5 (which could be why the experience is different and working properly?)
OD8.1 running with Tomcat version 9.0.58
Before I update ddlog4j.properties and set the VPAppLogClient.log4j.properties information into this file, is there any other alternative I should review?
Are there any risks I break any logging in Experience Portal under
Audit Log Viewer/Trace Viewer/Log Viewer
or any of the Reports
I do not see any issues there, but want to confirm
Thanks in advance.
Application: TestApp has ddlog4j.properties file set with different appenders.
Deployed the app to test/model with no issues. log for TestApp is TestApp.log and logging correctly.
Noticed when starting Tomcat and launching the application on developer workstation, make test call (Experience Portal points to my workstation) the TestApp.log starts but never logs anything more than one line.
This was not the experience before. Something triggered this and not sure what it is. Worried could happen in production. Need to investigate further.
In this scenario, it will use VPAppLogClient.log4j.properties as the main logging properties files and ignores ddlog4j.properties in the Application data directory.
If I start Tomcat local, go to Experience Portal and verify the application, THEN make a test call, the TestApp.log begins to log correctly as does the vpAppLogClient.log
I could do one of two things:
Use VPAppLogClient.log4j.properties and set all logging properties from ddlog4j.properties into VPAppLogClient.log4j.properties
or
Update ddlog4j.properties and set the VPAppLogClient.log4j.properties information into this file.
In this scenario, I have to rename or delete the file VPAppLogClient.log4j.properties so it does not load.
At this time, I prefer the second option as we typically have more control on updating the application and deploying that vs the VPAppLogClient.log4j.properties file we never have touched.
I tried moving the jar order in the app, but did not fix.
Achieving all this by using Log4j2 bridge method, keeping all existing code the same while adding the JVM parameter: -Dlog4j1.compatibility=true
and using the following jars:
log4j-1.2-api-2.23.1.jar
log4j-api-2.23.1.jar
log4j-core-2.23.1.jar
VPAppLogClient.log4j.properties details:
log4j.appender.VPAppClientLog=org.apache.log4j.Rol lingFileAppender
log4j.appender.VPAppClientLog.File=${LOG4J_DIR}/vpAppLogClient.log
Also note:
Original value in VPAppLogClient.log4j.properties had the appender named: VPAppLogClient
This had to be updated to VPAppClientLog (notice Client and Log are flipped. Any other name could be used except: VPAppLogClient)
By leaving the name as is, I would see this error in log file:
Caught exception try to determine the vpApLogClient log4j file path:
ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender
at com.avaya.vp.applog.client.VPAppLogClientBase.getS aveReportPath(VPAppLogClientBase.java:800) [VPAppLogClient_7.1.0.jar:
research showed this error could be when using .file= instead of uppercase .File= , but this was not the case in this situation. I simply renamed it originally to Test.Log and that fixed that issue.
I then retried the name and could duplicate the error, so used a name that was very similar to fix this.
Lastly, We do have two enviroments, One is OD7.1 which we are migrating from to OD8.1
we are using the same bridge jar files and using the original files that came with that version:
VPAppLogClient.log4j2.properties
VPAppLogClient_8.1.1.jar
VPAppLogClientWS_8.1.1.jar
this environment has no issues and working correctly.
Both running on Windows Server.
OD7.1 running with Tomcat version 7.0.x
Test / Model Servers running 7.5 (which could be why the experience is different and working properly?)
OD8.1 running with Tomcat version 9.0.58
Before I update ddlog4j.properties and set the VPAppLogClient.log4j.properties information into this file, is there any other alternative I should review?
Are there any risks I break any logging in Experience Portal under
Audit Log Viewer/Trace Viewer/Log Viewer
or any of the Reports
I do not see any issues there, but want to confirm
Thanks in advance.
Comment