Expected behavior
Log4j2 log entries sent to the application insights workspace as trace entries.
Actual behavior
Log4j2 entries were not sent when relying on only codeless instrumentation with the 3.0.0 agent.
However, they were when configuring the AI appender in the log4j2.xml explicitly.
To Reproduce
Steps to reproduce the behavior:
add the -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector system property, you will see that log4j2 entries no more are sent to AI workspace as application trace.
Sample Application
https://github.com/vargadan/ai-log4j-reproducer
System information
Please provide the following information:
- SDK Version: agent 3.0.0
- OS type and version: Ubuntu 18.04
- Application Server type and version (if applicable): Tomcat 9 (as of the current tomcat:jdk11-openjdk-slim image)
- Using spring-boot? NO
- Additional relevant libraries (with version, if applicable):
log4j2 2.14.0
Logs
Turn on SDK logs and attach/paste them to the issue. If using an application server, also attach any relevant server logs.
Be sure to remove any private information from the logs before posting!
Screenshots
If applicable, add screenshots to help explain your problem.
Expected behavior
Log4j2 log entries sent to the application insights workspace as trace entries.
Actual behavior
Log4j2 entries were not sent when relying on only codeless instrumentation with the 3.0.0 agent.
However, they were when configuring the AI appender in the log4j2.xml explicitly.
To Reproduce
Steps to reproduce the behavior:
add the -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector system property, you will see that log4j2 entries no more are sent to AI workspace as application trace.
Sample Application
https://github.com/vargadan/ai-log4j-reproducer
System information
Please provide the following information:
log4j2 2.14.0
Logs
Turn on SDK logs and attach/paste them to the issue. If using an application server, also attach any relevant server logs.
Be sure to remove any private information from the logs before posting!
Screenshots
If applicable, add screenshots to help explain your problem.