MACRO: Queued Logging to BBEdit (with Multiple Tab Support)

So... a funny thing happened...

I spent some time working on an update to this that is MUCH faster - by an order of magnitude. Great stuff.

Then, out of the blue, I remembered something I wrote back in 2016, which I still use now in macros that I run every day. Although obviously I haven't checked the results in a while or I would have remembered.

It's a set of macros that do logging, including having timestamps and elapsed time! They do it by writing to a file. And guess what? You can open the file in BBEdit, and BBEdit will refresh it when the file changes.

2024-08-03 18:00:02.328	 1:57:29.882	********Starting Macro **************************
2024-08-03 18:00:02.631	         303	Mounting Volume (if needed)
2024-08-03 18:00:06.036	       3.405	Starting Backup
2024-08-03 18:00:06.261	         225	Starting Backup
2024-08-03 18:00:06.557	         296	Enabling "Time Machine Backups - Check for Done", timeout: 1722736806
2024-08-03 18:00:06.805	         248	=========Macro ended without errors==============
2024-08-03 18:01:02.108	      55.303	------------ Checking for Done -------------
2024-08-03 18:01:32.413	      30.305	Backup has finished, unmounting volume
2024-08-03 20:00:02.335	 1:58:29.922	********Starting Macro **************************
2024-08-03 20:00:02.636	         301	Mounting Volume (if needed)
2024-08-03 20:00:06.043	       3.407	Starting Backup
2024-08-03 20:00:06.269	         226	Starting Backup
2024-08-03 20:00:06.578	         309	Enabling "Time Machine Backups - Check for Done", timeout: 1722744006
2024-08-03 20:00:06.838	         260	=========Macro ended without errors==============
2024-08-03 20:01:02.101	      55.263	------------ Checking for Done -------------
2024-08-03 20:01:32.399	      30.298	Backup has finished, unmounting volume
2024-08-03 22:00:02.331	 1:58:29.932	********Starting Macro **************************
2024-08-03 22:00:02.630	         299	Mounting Volume (if needed)
2024-08-03 22:00:06.064	       3.434	Starting Backup
2024-08-03 22:00:06.323	         259	Starting Backup
2024-08-03 22:00:06.651	         328	Enabling "Time Machine Backups - Check for Done", timeout: 1722751206
2024-08-03 22:00:06.881	         230	=========Macro ended without errors==============
2024-08-03 22:01:02.102	      55.221	------------ Checking for Done -------------
2024-08-03 22:01:32.425	      30.323	Backup has finished, unmounting volume
2024-08-03 22:01:34.362	       1.937	-------- Macro ended without errors --------

So it turns out I actually don't need this BBEdit macro - the file version is much better. Sometimes I can be a real moron. Here's the post I made about it on this forum:

I could actually use the "queue" mechanism I wrote to make the "elapsed time" version a little faster, but at this point, all I can do is shake my head.

2 Likes