← Back to blogYouTube Video

Published August 22, 2026

Log everything, alert immediately - Automation Tip #5

Part 5 of 7 in Automation Tips

Can't play the video or having issues? Here's the direct link.

Summary

I build every AI automation and agent with detailed logs and immediate alerts so I’m never operating in the dark. I argue that automations inevitably break—LLMs hallucinate invalid output, scrapers get blocked or hit changed HTML, GUI automations break when screen sizes shift—so the goal is not preventing every failure but making failures easy to retrace and fix. I show how logging every step and alerting the decision maker immediately prevents the scenario I’ve seen where an automation crashes and nobody notices for weeks; my take is that proper logs and precise alerts are the most important operational layer for any AI workflow or agent.

Key takeaways

  • Log every step of the automation pipeline so you can retrace inputs, decisions, and outputs when something fails.
  • Alert the decision maker immediately when an automation crashes; otherwise silent failures can go unnoticed for weeks.
  • Treat LLM output as unreliable: log invalid or hallucinated responses and guard downstream steps against them.
  • Expect platform-specific failures—IP blocks in scraping, HTML changes, screen-size shifts in GUI automation—and log enough context to diagnose them.
  • Don’t rely on an LLM to tell you what your automation did; your logs should provide the ground truth first.
Read: how to make AI automations reliable →Logging, alerts, guards in code and human approval, and how I use them in the automations I build for clients.

Want an automation like this for your business?

I build AI automations and agents for small businesses. Book a free call and tell me what you'd like to automate, or see how I automated Mastersealer's quoting.

Description

The most important thing for your AI workflows and agents to have is proper detailed logs and precise alerts set up to ensure that you never operate in the dark. When something goes wrong, you are alerted immediately. You don't waste weeks not knowing that your AI agent has crashed. When you need to debug an issue, you have detailed logs that show you what happens at every step of the automation pipeline. You're not operating in the dark.

Transcript

So one of the biggest issues I see with programmers today is that they don't know how to debug programs without LLMs. Back in the day, before LLMs, you would expect the programmer to either read the docs, Google the issue, search for Stack Overflow, etc., etc., right? And you would expect them to find out more about what went wrong and have, or at least develop, a really good understanding of the problem, right? We don't do that anymore. Now we just paste the entire message in Claude and expect it to give us a perfect solution, which, you know, that comes with its own set of problems, and I'm not going to get into that in this video. But before we had Claude, we had something I would say even more useful, and that is the application logs. And logs are just that. They're just logs, right? They're just a bunch of statements, right? You log everything that your application is doing, every single action it takes, every single thing that's happening inside your application. And this way, if something goes wrong, which it inevitably will sooner or later, then you can just review the logs, see what went wrong, see what kind of input your application received, what it did with it, etc., etc., and just fix the issue from that, right? And this makes debugging an application a thousand times easier. And especially when you're building AI automations and agentic workflows and all that, especially when you're involved LLMs and their hallucinatory nature in your automations, you need logs, right? Because here's the reason, right? When you're automating a task, you're expecting that a human will no longer be doing it, right? Because you're automating it, no actual human being is going to do it, right? A machine is going to do it for you. That means that the automation has to record its steps very accurately so that when it inevitably fails, a human can retrace its steps and, you know, just see what went wrong, right? And something can always go wrong. If you're using LLMs, if you're building AI agents, you could have the agent hallucinate bad output, right? You could have some invalid output produced that completely breaks your program because it didn't expect this output, right? If you're doing, I don't know, web scraping like I do a lot of web scraping, right? Or just simple browser automation tasks, right? There's numerous issues in this as well. Your IP address could get blocked because you're scraping websites or, you know, building bots for websites, or their HTML structure would change and your entire automation would just break because of that. Like, there's issues in every single kind of automation you build, even if it's GUI automation, especially if it's GUI automation, because screen sizes can change. It's a whole, like, different mess of an automation style. It's very finicky, very fragile, and very easy to break. But the point is, automations do break, right? They work most of the time, but they do break eventually. And when they do, you want to make it as easy as possible for you to actually fix the issue, right? So when failures like these inevitably happen, you need to make sure you're logging every step and alerting the decision makers in your company, or if you're building this for yourself, then you're the decision maker, I guess. But you need to have logs, you need to have alerts so that you actually figure out what went wrong, right? Because believe it or not, I've seen companies where automations such as these were broken, the program crashed and stopped working, and nobody noticed for weeks, as in literally weeks. And, you know, I can't even blame them because, like, you've got your own work to do, right? You've got your own shit to deal with. You're not going to notice these things going down unless something truly catastrophic happens, right? And that is exactly why you need alerts and you need logs. So that's the big tip for today, right? Set up alerts so that you can always notify the decision makers, probably yourself, that something went wrong and you should go fix it, and set up logs, proper detailed application logs, so that you can retrace the automation's steps anytime some issue pops up.

Share this article

Hassan Aziz pointing up

Dude, you’re at the bottom of my landing page.

Just book a call already if you’re that interested.

You scrolled all the way here.

Book a free call on Calendly