From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sFIRLVB/715QBAAA0tVLHw (envelope-from ) for ; Sun, 21 Jun 2020 15:40:00 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id SDjPKFB/716IUgAAbx9fmQ (envelope-from ) for ; Sun, 21 Jun 2020 15:40:00 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 59943940276 for ; Sun, 21 Jun 2020 15:40:00 +0000 (UTC) Received: from localhost ([::1]:48266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jn24d-0001u4-A8 for larch@yhetil.org; Sun, 21 Jun 2020 11:39:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmY48-0007vp-OP for emacs-orgmode@gnu.org; Sat, 20 Jun 2020 03:37:28 -0400 Received: from mail-io1-xd36.google.com ([2607:f8b0:4864:20::d36]:34447) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jmY47-0000C8-4w for emacs-orgmode@gnu.org; Sat, 20 Jun 2020 03:37:28 -0400 Received: by mail-io1-xd36.google.com with SMTP id m81so13945317ioa.1 for ; Sat, 20 Jun 2020 00:37:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=uU3TPOHys+ehvUm0/qMO9ftO7dwGq92kii1t2hiZsmI=; b=HU+ORXTebFCFEhMF7TpeZTplCsxQrcKXwqFf2dfIaf0QdzNTUdKu+/9rXDkUC+fp1m fr21atG0yeR5b5yvbMbwaDC20BJFSAyfBtuzFqpTEBoRJKubpVF4g7JmLUsmUnG8ke3h PK1CpSbRXpJCnEOblkFv8Vzd0fiF+qFfuGPahTDjLnTiyYoTmvatwnUVVteEL93SwZQZ 9wMXs8hVdO1YVla0ArJ+jHPaw00GuVdPlV5cyrYqLT/D8myLbgIeyP96UuFpY61S1/CZ XQebZ3ZyjCCEpiouGbdOxxj87J3Q7wfVz7qjSH8IxpKhIkqxm4QJAaDrcwqfvE5pwndc YRHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=uU3TPOHys+ehvUm0/qMO9ftO7dwGq92kii1t2hiZsmI=; b=oJHRQOmHI6VzsEPBcM/cTrKqf4fQfFU0QVwCKpMy9NtYns3+Rl7xdYQUEFsqK4xFt3 pow5vP/cU7F94KYd1rVtA+EhT5jrIX8pfOj8+JMKqU/j4XBRLwaSG8vuxfthXudNFT1L eaRMD/Dk4FpbKVzIUDDAHWznBbooCDBminZGDZCkqFaoUPnsbxW4HlzmarCZArBn2MUw GXS3qp2zNnN3n6wknbWocARpLDeQNnWnKacpK3jaARmpEhW4vmEIORoQ3XLMBnuEdPjV OUBo399kxDnJIsVHhgLYh5IyjQM/mgEotcb3JV2HpBUlPPUlmdKQnhNyHbssgIMK8KaY IZ4w== X-Gm-Message-State: AOAM532qqQXXdrxpdfdugfIMMCQIpbk/acMNpklX/a8NwTszYVhGvCus +XYSHIYHZOGOFExHegjIXnByxWliySvyLYw7/5I3Io5g X-Google-Smtp-Source: ABdhPJwBrRu+XKlmMD4hQT8hQPGDgCWrRH0CURXSdnzUqXOSDI5WAro+pK0pBKDZejr1Ohjabc7qsCN56tWUSrY0jrI= X-Received: by 2002:a5e:9309:: with SMTP id k9mr8174420iom.135.1592638644996; Sat, 20 Jun 2020 00:37:24 -0700 (PDT) MIME-Version: 1.0 From: Meng Weng Wong Date: Sat, 20 Jun 2020 15:37:13 +0800 Message-ID: Subject: org-mode as a logging target To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000b0d59405a87f143a" Received-SPF: pass client-ip=2607:f8b0:4864:20::d36; envelope-from=mengwong@gmail.com; helo=mail-io1-xd36.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Mailman-Approved-At: Sun, 21 Jun 2020 11:39:20 -0400 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=HU+ORXTe; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -0.71 X-TUID: IOfEHL2tQU4r --000000000000b0d59405a87f143a Content-Type: text/plain; charset="UTF-8" I've been enjoying a featherweight alternative to log levels, made possible by org-mode. Try this the next time you write a little throwaway command-line utility 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: Rejoice! Optional: You can tail the logfile with M-x auto-revert-mode. 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 :) That is all. --000000000000b0d59405a87f143a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I've been enjoying a featherweight alternative to log = levels, made possible by org-mode.

Try this the next tim= e you write a little throwaway command-line utility script:

<= /div>
Step 1: Add asterisks=C2=A0to the front of your printf traces.

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

Step 3: Op= en the log file in org-mode.

Step 4: Rejoice!

Optional: You=C2=A0can=C2=A0tail the logfile with M-x = auto-revert-mode.

This illustration uses a Github = scraper as an example:

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

That is all.

--000000000000b0d59405a87f143a--