Notepad Log Files on Visual Studio Code

Did you know that you can use Windows Notepad to create log files? It’s a feature that has been available on Windows since at least version 3.1… and I know it because, well, I’m old enough to have used such a feature to keep my own journal around 1992.

I was surprised to not be able to find a Visual Studio Code extension with this feature (maybe it exists, but I could not find it) so, what’s a developer to do? Create your own, of course!

The extension is open source, and it’s available on GitLab. I’ve also somehow “modernized” the concept of these .LOG files, by adding some extra pizzazz for Markdown and AsciiDoc.

This extension watches files of the following types:

The principle is simple: if any file of this type starts with the text .LOG, this extension automatically inserts the current date and time. In the case of Markdown and AsciiDoc, the date and time are inserted as second-level titles.

It also contributes a configurable setting key: notepad-log.format, specifying the format used to display the date and time on the journal file. The default value is 'YYYY-MM-DD hh:mm:ss'.

Enjoy!