-
Notifications
You must be signed in to change notification settings - Fork 207
Closed
Description
Expected behavior
- All logs levels reflected in Azure Application Insights dashboard as it is in the console/stdout logs. 'INFO' shows up as info itemType.
- Correct timestamp as it is in the console/stdout logs.
Actual behavior
Azure Application Insights dashboard:
All log levels (INFO, DEBUG, etc) show up as 'trace' in itemType.

Console logs
14:11:03.524 [restartedMain] INFO o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8383"]
14:11:03.524 [restartedMain] INFO o.a.catalina.core.StandardService - Starting service [Tomcat]
14:11:03.524 [restartedMain] INFO o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.36]
14:11:03.700 [restartedMain] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
System information
- SDK Version:
- JDK@11
- spring-boot@2.3.1
- applicationinsights-logging-logback@2.6.1
- OS type and version: Mac OS X 10.15.5
- Using spring-boot? Yes
logback-spring.xml
<configuration>
<appender name="aiAppender"
class="com.microsoft.applicationinsights.logback.ApplicationInsightsAppender">
<instrumentationKey>...</instrumentationKey>
</appender>
<appender name="stdout"
class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder
by default -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root level="trace">
<appender-ref ref="aiAppender" />
<appender-ref ref="stdout" />
</root>
</configuration>
Any help appreciated. Thanks!
Metadata
Metadata
Assignees
Labels
No labels