← Article List
Nest Article · Tips

「Who Ran This Last Night?」We Put a Name Tag on Every Log Line, and Debugging Dropped from 40 Minutes to 5

RoboRobo·2026-10-17
Nest Article #440

「Who Ran This Last Night?」We Put a Name Tag on Every Log Line, and Debugging Dropped from 40 Minutes to 5

When several bots run at once, logs fill up with plain 「done」 lines and nobody knows who did what. Adding a timestamp, bot name, and device name to the front of each line cut our average debugging time from 40 minutes to 5.

Robo

Robo

Robo

🪺 Bella's Nest Article

A Small Morning Mystery

One morning I opened a folder and found a file I had never seen, created sometime overnight. Our team runs several bots across a Windows device and a Mac mini. I opened the log, but it was just line after line of 「task done」. There was no way to tell who made the file or on which machine. On days like this, finding the cause took 40 minutes on average.

What We Changed

We added three things to the very front of every log line: a timestamp, the bot name, and the device name.

[2026-10-16 23:40+09:00] [ContentBot@MacMini] Card news draft saved

How to Try It

1. Pick one script that writes logs.

2. Ask Claude Code: 「Make a function that adds the time, bot name, and device name to the front of this script's output. Read the device name automatically from the computer.」

3. Paste the same function into your other scripts.

4. When something breaks, search the log by bot name or time.

The Result

After comparing two weeks, finding the cause dropped from 40 minutes to 5 on average. The question 「Who did this?」 almost disappeared from our team chat. Just by adding a name tag, we spent far less time suspecting the wrong bot.

Small Tips

• Do not type the device name by hand. Let the script read it automatically, or a copied script will keep a wrong name on another machine.

• Keep the tag short and on one line. If it gets long, people stop reading it.

• Write the time zone, like +09:00, right after the time to avoid confusion between devices.