unofficial mirror of emacs-orgmode@gnu.org
 help / color / Atom feed
* org-mode as a logging target
@ 2020-06-20  7:37 Meng Weng Wong
  2020-06-21 19:09 ` Diego Zamboni
  0 siblings, 1 reply; 3+ messages in thread
From: Meng Weng Wong @ 2020-06-20  7:37 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 639 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 1123 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: org-mode as a logging target
  2020-06-20  7:37 org-mode as a logging target Meng Weng Wong
@ 2020-06-21 19:09 ` Diego Zamboni
  2020-06-21 19:25   ` Russell Adams
  0 siblings, 1 reply; 3+ messages in thread
From: Diego Zamboni @ 2020-06-21 19:09 UTC (permalink / raw)
  To: Meng Weng Wong; +Cc: Org-mode

[-- Attachment #1: Type: text/plain, Size: 816 bytes --]

This is actually pretty cool! Thanks for the tip,
--Diego


On Sun, Jun 21, 2020 at 5:39 PM Meng Weng Wong <mengwong@gmail.com> 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.
>
>

[-- Attachment #2: Type: text/html, Size: 1609 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: org-mode as a logging target
  2020-06-21 19:09 ` Diego Zamboni
@ 2020-06-21 19:25   ` Russell Adams
  0 siblings, 0 replies; 3+ messages in thread
From: Russell Adams @ 2020-06-21 19:25 UTC (permalink / raw)
  To: emacs-orgmode

Take my upvote!

+1

On Sun, Jun 21, 2020 at 09:09:01PM +0200, Diego Zamboni wrote:
> This is actually pretty cool! Thanks for the tip,
> --Diego
>
>
> On Sun, Jun 21, 2020 at 5:39 PM Meng Weng Wong <mengwong@gmail.com> 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.
> >
> >


------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-20  7:37 org-mode as a logging target Meng Weng Wong
2020-06-21 19:09 ` Diego Zamboni
2020-06-21 19:25   ` Russell Adams

unofficial mirror of emacs-orgmode@gnu.org

Archives are clonable:
	git clone --mirror https://yhetil.org/orgmode/0 orgmode/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 orgmode orgmode/ https://yhetil.org/orgmode \
		emacs-orgmode@gnu.org
	public-inbox-index orgmode

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git