Skip to content

Disabling instrumentation of logging no longer works #2590

Closed
@dvag-holger-krusemark

Description

@dvag-holger-krusemark

We disabled instrumentation of logging (log4j2) by
export APPLICATIONINSIGHTS_INSTRUMENTATION_LOGGING_LEVEL=OFF
Disabling worked in version 3.2.4. After upgrading to version 3.3.0, disabling no longer works and the agent transfers all (severity level from 0 to 3) log messages to azure.
The agent in version 3.4.1 behaves the same way.

Expected behavior

Log messages are not transmitted to azure, when environment variable
APPLICATIONINSIGHTS_INSTRUMENTATION_LOGGING_LEVEL is set to "OFF".
If the value is set to "FATAL", the agent only transmits log messages with serverity level 4 (FATAL).

Actual behavior

When starting the application, the agent logs the message
DEBUG c.m.a.a.i.c.ConfigurationBuilder - read environment variable: APPLICATIONINSIGHTS_INSTRUMENTATION_LOGGING_LEVEL=OFF
All log messages (log severity from 0 to at least 3) are transmitted to azure.
If the value is set to "FATAL", the agent transmits log messages with serverity level 3 (ERROR).

To Reproduce

Sample Application

System information

Please provide the following information:

  • SDK Version: 3.3.0, 3.4.1
  • OS type and version: Linux
  • Application Server type and version (if applicable): Tomcat
  • Using spring-boot? No
  • Additional relevant libraries (with version, if applicable): log4j-2-17.0

Logs

Screenshots

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions