Creating a work log
Just before Christmas 2024, Chris Albon of Wikimedia posted this on Bluesky about keeping track of his work by using a script to log his day:
He also posted a link to this 15 minute video called Don’t Do Invisible Work https://www.youtube.com/watch?v=HiF83i1OLOM in which he goes into details about why and how to keep a log. Key points I took away were:
Keeping a log stops you forgetting how much work you really did.
Keeping a log using a script and text file means you are not tied to any company or propriety system, so your log is portable and not at the mercy of changing jobs or software upgrades.
Keeping a log is useful for supporting co-workers as you track your interactions with them and therefore some of their work too.
Even if you are not someone who is comfortable with coding this seems like a very good idea. One could use a Word document, spreadsheet or even paper. Although I know habits take months to form or break so that is probably the biggest challenge (for me).
As I am really lazy, I asked Claude to recreate the shell script for me from the screengrab.
#!/bin/bash
# Function to log messages with timestamps
log() {
# Define the path to your log file
local log_file="$HOME/Documents/work_log.txt"
# Get the current timestamp in ISO 8601 format
local timestamp=$(date -u +"%Y-%m-%d")
# Append the timestamp and message to the log file
echo "$timestamp $*" >> "$log_file"
# Print a confirmation message
echo "Logged: $timestamp $*"
}
I work across Window and Linux operating systems, so a bash script works for me and on my Windows machine I use Gitbash. So once the script logger.sh
is sourced in my home directory, I use it with the command log
followed by whatever I want to log like so:
$ log added blog to my website
which records this to the work_log.txt
file:
Logged: 2025-01-03 added blog to my website
Now all I have to do is actually form the habit of using it!
Back to topCitation
@online{bailey2025,
author = {Bailey, Alistair},
title = {Creating a Work Log},
date = {2025-01-03},
url = {https://ab604.uk/blog/2024-12-11-TIL/},
langid = {en}
}