Console logs in Log Analytics workspace

Copper Contributor

Hi,

I am using Console logs (ASP Core buildin ILogger) in App Service (Linux) and I found all logs in Log Analytics having Informational severity level. There is any way to make Level working correctly? May be special log format?

Zaduvalo_1-1627578593818.png

(custom log format on image)

 

Thanks

 

 

 

2 Replies

@Zaduvalo 

 

If you cant change the application that writes the logs into Log Analytics to have the values in Informational be correct. You can parse the correct values into a new column and use those.   Sort of like this....a fake basic example 

let ResultDescription = "jhjhjhjhjhjhj |warn| jdndm";
Usage
| parse ResultDescription with * '|' newLevel '|' *
| project newLevel
| where newLevel == "warn"

column correct. Then you could parse the other column and extract the values and use those

@CliveWatson Thanks, I found this is not a global problem, actual log level works fine if I am searching in Application Insights. But in Log Analytics workspace using "AppServiceConsoleLogs" query, Level always Informational.

This is not a parsing problem.