GNU bug report logs - #55163
29.0.50; master 4a1f69ebca (TICKS . HZ) for current-time broke lsp-mode

Previous Next

Package: emacs;

Reported by: Vincenzo Pupillo <v.pupillo <at> gmail.com>

Date: Thu, 28 Apr 2022 10:55:01 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #73 received at 55163 <at> debbugs.gnu.org (full text, mbox):

From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: larsi <at> gnus.org, eggert <at> cs.ucla.edu, 55163 <at> debbugs.gnu.org,
 monnier <at> iro.umontreal.ca
Subject: Re: bug#55163: 29.0.50;
 master 4a1f69ebca (TICKS . HZ) for current-time broke lsp-mode
Date: Sat, 30 Apr 2022 14:32:17 +0200
In data sabato 30 aprile 2022 13:25:31 CEST, Eli Zaretskii ha scritto:
> > From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
> > Cc: larsi <at> gnus.org, 55163 <at> debbugs.gnu.org, monnier <at> 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.







This bug report was last modified 3 years and 19 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.