@mike010101 It seems like the logs are being formatted differently when you tail them from the console using the az containerapp logs show
command. The logs are being displayed in JSON format with a TimeStamp
and Log
field. This is the expected behavior when you use the --type console
option with the az containerapp logs show
command.
However, in your application logs, the logs are being formatted differently with a timestamp, log level, logger name, and log message separated by |
characters. This is a common log format used by many logging frameworks.
To make sure that your logs are formatted correctly, you can use a logging framework that supports JSON formatting. This will ensure that your logs are formatted consistently and can be easily parsed by tools that expect JSON-formatted logs.
Alternatively, you can use a log aggregator like Azure Monitor or Log Analytics to collect and analyze your logs. These services can parse logs in various formats and provide powerful querying and visualization capabilities. You can configure your Azure Container Apps environment to send logs to Azure Monitor or Log Analytics by following the instructions in the Log storage and monitoring options in Azure Container Apps document.