all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vincenzo Pupillo <v.pupillo@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, eggert@cs.ucla.edu, 55163@debbugs.gnu.org,
	monnier@iro.umontreal.ca
Subject: bug#55163: 29.0.50; master 4a1f69ebca (TICKS . HZ) for current-time broke lsp-mode
Date: Sat, 30 Apr 2022 14:32:17 +0200	[thread overview]
Message-ID: <3233184.5fSG56mABF@zarathustrawsp500> (raw)
In-Reply-To: <83ee1e95jo.fsf@gnu.org>

In data sabato 30 aprile 2022 13:25:31 CEST, Eli Zaretskii ha scritto:
> > From: Vincenzo Pupillo <v.pupillo@gmail.com>
> > Cc: larsi@gnus.org, 55163@debbugs.gnu.org, monnier@iro.umontreal.ca
> > Date: Sat, 30 Apr 2022 13:21:04 +0200
> > 
> > In data sabato 30 aprile 2022 07:40:32 CEST, Eli Zaretskii ha scritto:
> > > As I already said up-thread: let's not introduce APIs for which we
> > > don't have clear and frequently-needed use cases in Emacs.  Emacs is
> > > not a general-purpose programming platform, it's mainly a platform for
> > > writing text-processing applications.
> > 
> > Many packages on melpa/elpa have a custom log function. I'm not familiar
> > with the Emacs API, is there a standard way to log events?
> > I think a simple log function would be useful for many packages.
> 
> Do you mean logging to the system log?
> 
> If not, then generating a log doesn't require any new primitives, I
> think, you could just use write-region or something?
> 
> Or am I misunderstanding the feature you have in mind?

I mean something that can generate a properly formatted log message, in a 
"standard" way (with log levels, ERROR, WARNING, INFO etc, if possible), for 
both use cases if possible. Something like log4j, but not as monstrous as 
log4j.

Just three examples of different way to generate logging message:  
1. jsonrpc has a function, jsonrpc--log-event, that generates a message 
                          (msg (format "[%s]%s%s %s:\n%s"
                                   type
                                   (if id (format " (id:%s)" id) "")
                                   (if error " ERROR" "")
                                   (current-time-string)
                                   (pp-to-string message))))
2. treemacs (see treemacs-logging.el: one function and six macro)
3. the package log4e (on melpa)

The message format of these three packets is different.
Something more "standardized" may be useful, I think.








  reply	other threads:[~2022-04-30 12:32 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 10:53 bug#55163: 29.0.50; master 4a1f69ebca (TICKS . HZ) for current-time broke lsp-mode Vincenzo Pupillo
2022-04-28 12:10 ` Lars Ingebrigtsen
2022-04-28 13:38   ` Eli Zaretskii
2022-04-28 20:15   ` Paul Eggert
2022-04-28 20:42     ` Vincenzo Pupillo
2022-04-28 21:55       ` Lars Ingebrigtsen
2022-04-28 21:51     ` Lars Ingebrigtsen
2022-04-29  9:54       ` Lars Ingebrigtsen
2022-04-29 10:54         ` Eli Zaretskii
2022-04-29 10:59           ` Lars Ingebrigtsen
2022-04-29 11:10             ` Eli Zaretskii
2022-04-29 19:38               ` Paul Eggert
2022-04-29 19:53                 ` Eli Zaretskii
2022-04-29 22:45                   ` Paul Eggert
2022-04-30  5:29                     ` Eli Zaretskii
2022-04-30  9:10                   ` Lars Ingebrigtsen
2022-04-30 10:00                     ` Eli Zaretskii
2022-04-30 20:51                       ` Paul Eggert
2022-05-01  5:38                         ` Eli Zaretskii
2022-05-01 15:00                           ` Paul Eggert
2022-05-01 15:42                             ` Eli Zaretskii
2022-05-01 16:17                               ` Paul Eggert
2022-05-01 16:43                                 ` Eli Zaretskii
2022-05-02 17:27                                   ` Paul Eggert
2022-05-02 17:58                                     ` Eli Zaretskii
2022-05-02 23:17                                       ` Paul Eggert
2022-05-03  2:32                                         ` Eli Zaretskii
2022-05-03  2:52                                           ` Paul Eggert
2022-04-30  1:44         ` Paul Eggert
2022-04-30  5:40           ` Eli Zaretskii
2022-04-30 11:21             ` Vincenzo Pupillo
2022-04-30 11:25               ` Eli Zaretskii
2022-04-30 12:32                 ` Vincenzo Pupillo [this message]
2022-04-30 12:50                   ` Eli Zaretskii
2022-04-30 13:22                     ` Vincenzo Pupillo
2022-04-30  9:15           ` Lars Ingebrigtsen
2022-04-30 21:03             ` Paul Eggert
2022-05-01  5:40               ` Eli Zaretskii
2022-05-01 15:08                 ` Paul Eggert

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3233184.5fSG56mABF@zarathustrawsp500 \
    --to=v.pupillo@gmail.com \
    --cc=55163@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.