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 kH+4LYew714zRwAA0tVLHw (envelope-from ) for ; Sun, 21 Jun 2020 19:09:59 +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 aB9yKYew716/WAAAbx9fmQ (envelope-from ) for ; Sun, 21 Jun 2020 19:09:59 +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 D74E594051D for ; Sun, 21 Jun 2020 19:09:58 +0000 (UTC) Received: from localhost ([::1]:33712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jn5Lo-00020R-8n for larch@yhetil.org; Sun, 21 Jun 2020 15:09:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jn5LA-0001yN-Jf for emacs-orgmode@gnu.org; Sun, 21 Jun 2020 15:09:16 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]:35715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jn5L8-0005nd-KA for emacs-orgmode@gnu.org; Sun, 21 Jun 2020 15:09:16 -0400 Received: by mail-ej1-x62a.google.com with SMTP id g1so46996eje.2 for ; Sun, 21 Jun 2020 12:09:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zzamboni-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eVeTWLCQOoPVgGaE6oaWK5D8uu3Q639lqup6zHbNpGg=; b=nXRBX0HdpOfKTND8oRAcmyXCENxNZYX7HUXP+tzFotFx5a48m5bmsEZ743OXfzWy0L lZWdBKOqUbe3j4g0W7g1inX1T5C6+Hy3IRxl11tkeu0jFVgf535QNgwZgZNKFKxxzLth UZCJLo/h6V5rfgVeB7kN6tyyIUUoMuUZPrmG69F4ak30ZGsdZwtjSheI01pWc3g8tOYR EVR9rfA8cgCExDcFTq5N1KwtUMnigXO0eFgLPB60NbGp/Nsf/qCCpXw78exaqZ7aTjKz nHtoh4hfKsKLG+7nTjCgQnfxgU1IoA/LfzTFaL5LaKVHrOKewTIr9voYqBWPTANnbpBU MHhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eVeTWLCQOoPVgGaE6oaWK5D8uu3Q639lqup6zHbNpGg=; b=hUko7w9cmdBJgcwgcgtrvHXdq52h7ZZuzFaTMFwmz9FYNdhzSIGSpAMw5IXB6Qn/Su bEhU1aZcAJkXHk09SHAQf7fNjSmEnaJ3Qt3ZiStheFuyHp+7vdX+9XgUo7LmuXvlxV6y 76GulRtFmMZT+BL2y39atXHWlEEKea0oR87Ir2O2OTaQtSh8nT8wOIXzEEcOYBvP7YVO cE+875GLWQ3mgY5Qo470YEhFytb2eArmkyCRZVUPJcD+QgNxkq14HnvFf+8r4xiQo0IC nS4xuiZ++6E8rwgYsD6+khbS5IcYVCGdV1Qj1ZhNvJMgQ6Qnjf1mlAOHiu4DEGPt5n7R xp8Q== X-Gm-Message-State: AOAM5318MspHyiV8CFA4zQKWTNARVgROAX0jHWn1Hk+UMBF0YHg6S1yF z/UqC6VETl9IVELtMAk25IGwXP4MZQtyIt76X3UnDA== X-Google-Smtp-Source: ABdhPJz8psYyi03hT3rgCmEJzgraxJ/T/YmeH7MrvWvDt7Wsnz0QkMcxStFkbSFh/dDb1fMTuMg0yaqTI7FqxpBi29U= X-Received: by 2002:a17:906:5fc4:: with SMTP id k4mr3268284ejv.94.1592766551815; Sun, 21 Jun 2020 12:09:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Diego Zamboni Date: Sun, 21 Jun 2020 21:09:01 +0200 Message-ID: Subject: Re: org-mode as a logging target To: Meng Weng Wong Content-Type: multipart/alternative; boundary="0000000000008857fe05a89cdca4" Received-SPF: none client-ip=2a00:1450:4864:20::62a; envelope-from=diego@zzamboni.org; helo=mail-ej1-x62a.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: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: , Cc: Org-mode 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=zzamboni-org.20150623.gappssmtp.com header.s=20150623 header.b=nXRBX0Hd; dmarc=none; 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: -1.21 X-TUID: SfUoZJ9fO3kd --0000000000008857fe05a89cdca4 Content-Type: text/plain; charset="UTF-8" This is actually pretty cool! Thanks for the tip, --Diego On Sun, Jun 21, 2020 at 5:39 PM Meng Weng Wong wrote: > 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. > > --0000000000008857fe05a89cdca4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This is actually pretty cool! Thanks for the tip,
--Di= ego


On Sun, Jun 21, 2020 at 5:39 PM Meng Weng Wong <= mengwong@gmail.com> wrote:
=
I&= #39;ve been enjoying a featherweight alternative to log levels, made possib= le by org-mode.

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

Step 1: A= dd asterisks=C2=A0to the front of your printf traces.

<= div>Step 2: Tee your STDOUT / STDERR to a file named log.org

Step 3: Ope= n the log file in org-mode.

Step 4: Rejoice!
=

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

This illustration uses a Github s= craper as an example:
<= div>

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

That = is all.

--0000000000008857fe05a89cdca4--