From: Eli Zaretskii <eliz@gnu.org>
To: "Matúš Goljer" <matus.goljer@gmail.com>
Cc: yantar92@posteo.net, emacs-devel@gnu.org
Subject: Re: New (only?) extensible logging package for Emacs
Date: Mon, 13 Mar 2023 18:47:54 +0200 [thread overview]
Message-ID: <834jqotx6t.fsf@gnu.org> (raw)
In-Reply-To: <87fsa8mykq.fsf@gmail.com> (message from Matúš Goljer on Mon, 13 Mar 2023 16:59:49 +0100)
> From: Matúš Goljer <matus.goljer@gmail.com>
> Cc: yantar92@posteo.net, emacs-devel@gnu.org
> Date: Mon, 13 Mar 2023 16:59:49 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > I hope the log will end up in Emacs buffers, or at least that there
> > will be an option to do so. While other logging frameworks are
> > designed to work with programs that leave log files, in Emacs it is
> > customary to have the log in a buffer (and then the user can save that
> > buffer if needed).
>
> If you mean the "info" level logs I said we can log with message (the
> function), they would end up in *Messages* but of course can go to some
> other separate buffer.
*Messages* is not the best idea: in any long-running session, it is
full of uninteresting messages, and also wraps around after
message-log-max messages (and the default value of message-log-max is
quite low for serious logging).
So yes, I think these logs should go to a separate buffer.
> My most immediate use-case for this package is the development of Elsa,
> where I also develop a Language Server for LSP and use emacs-async with
> async workers. Having flexible appending logic in these subprocesses
> allows me to use the single interface (say lgr-info) to dispatch
> messages to:
>
> - client via LSP notifications
> - parent process via async-send
> - CLI when running elsa from terminal
>
> All just by configuring the loggers at the start of each process.
>
> For use inside Emacs session for debugging etc, a buffer seems like an
> obvious log destination.
Yes. Moreover, saving a buffer to a file, either from time to time or
based on some other trigger, is trivial.
next prev parent reply other threads:[~2023-03-13 16:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-11 13:30 New (only?) extensible logging package for Emacs Matúš Goljer
2023-03-11 15:27 ` Thomas Koch
2023-03-12 19:13 ` Matúš Goljer
2023-03-13 4:35 ` Ruijie Yu via Emacs development discussions.
2023-03-13 13:23 ` Matúš Goljer
2023-03-13 14:43 ` Thomas Koch
2023-03-13 17:25 ` Matúš Goljer
2023-03-15 0:56 ` Björn Bidar
2023-03-12 12:01 ` Ihor Radchenko
2023-03-13 13:28 ` Matúš Goljer
2023-03-13 14:39 ` Eli Zaretskii
2023-03-13 15:59 ` Matúš Goljer
2023-03-13 16:47 ` Eli Zaretskii [this message]
2023-03-13 17:27 ` Matúš Goljer
2023-03-13 17:28 ` [External] : " Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=834jqotx6t.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=matus.goljer@gmail.com \
--cc=yantar92@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).