I'm trying to write a straightforward script, possibly in PowerShell or Python, that performs a task and logs messages directly into Azure. I've noticed that unlike AWS CloudWatch Logs, where I can set up a "Log Group" and "Log Stream" easily and start logging messages, Azure seems to require a bunch of setup that makes simple logging pretty complicated. Is there a more straightforward method for sending custom log messages to Azure without needing extensive pre-setup? It feels unnecessary to create a custom log schema just to log basic messages. I was following this guide: [https://learn.microsoft.com/en-us/azure/azure-monitor/logs/tutorial-logs-ingestion-portal].
2 Answers
As far as I know, there's no easy way around it. Setting up Azure logging can really be a hassle! It's frustrating that something supposed to be simple turns into a complex setup. You’re definitely not alone in feeling this way!
If you're okay using the customEvents table for your logs, check out this link: https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-add-modify?tabs=aspnetcore#send-custom-events. It might simplify things for you!
Thanks for the tip! That looks promising; I might give it a try to streamline my logging.
Totally agree! It's wild how difficult it can be to log basic stuff, even compared to AWS, which has its own quirks.