emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

org-mode as a logging target in three easy steps


From: Meng Weng Wong
Subject: org-mode as a logging target in three easy steps
Date: Sat, 20 Jun 2020 17:52:00 +0800

I've been enjoying a featherweight alternative to log levels, made possible by org-mode. I've done this a couple of times now and am feeling good enough about it to recommend it to others.

The next time you write a little throwaway script:

Step 1: Add asterisks to the front of your printf traces.

Step 2: Tee your STDOUT / STDERR to a file named log.org

Step 3: Open the log file in org-mode.

Step 4: Enjoy!

This illustration uses a Github scraper as an example:
https://github.com/mengwong/git-scrape
https://twitter.com/mengwong/status/1274236595109982208

This is no substitute for real structured logging, of course :)

You can tail the logfile with M-x auto-revert-mode.

That is all!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]