Console logs in Log Analytics workspace

%3CLINGO-SUB%20id%3D%22lingo-sub-2595278%22%20slang%3D%22en-US%22%3EConsole%20logs%20in%20Log%20Analytics%20workspace%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2595278%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20am%20using%20Console%20logs%20(ASP%20Core%20buildin%20ILogger)%20in%20App%20Service%20(Linux)%20and%20I%20found%20all%20logs%20in%20Log%20Analytics%20having%20Informational%20severity%20level.%20There%20is%20any%20way%20to%20make%20Level%20working%20correctly%3F%20May%20be%20special%20log%20format%3F%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Zaduvalo_1-1627578593818.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F299237i0871749F50F92051%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Zaduvalo_1-1627578593818.png%22%20alt%3D%22Zaduvalo_1-1627578593818.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E(custom%20log%20format%20on%20image)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2595278%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EApplication%20Insights%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELog%20Analytics%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New 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

@Clive Watson 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.