[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] Logs

  • To: mirageos-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Hannes Mehnert <hannes@xxxxxxxxxxx>
  • Date: Fri, 16 Oct 2015 11:23:42 +0100
  • Delivery-date: Fri, 16 Oct 2015 10:24:27 +0000
  • List-id: Developer list for MirageOS <mirageos-devel.lists.xenproject.org>
  • Openpgp: id=11B5464249B5BD858FFF6328BC896588DF7C28EE

Hi Daniel,

On 10/16/2015 10:55, Daniel BÃnzli wrote:
> The topic was mentioned again on the mirage call. I also need such a library 
> in many different contexts and I keep on rewriting the bits of a basic logger 
> in too many of my projects.  
> I do have a Log module in bos [1] which represents the very basics I'd like, 
> but I would like to fork it and expand it a bit to make it more useful in 
> different contexts and independent of bos â as it doesn't depend on it and 
> I'd like for example to be able to use the same interface in js to log to the 
> browser console (see e.g. [2]). Here's roughly what I have in mind:
> * Format based.
> * Simple fixed levels [3].
> * Interaction with result type [4].
> * Notion of logging source and per source log level control. Sources should 
> be listable (for ui purposes).
> * Decoupling of log generation (logging function calls) and reporting (log 
> output/rendering).  
> * A few reporting profiles as optional subpackages, for a cli, for js, etc.
> This will happen soon or later on my side, so if you think you could be 
> served by that and have ideas about it, speak.

That looks great.

One idea I had (or some systemd people had, and discussed it with me)
is:  embed a UUID (or other unique id, depending solely on the source of
the message) into each log message.  This would allow a generic 'look
into the knowledge base at http://wherever for YYYYY for more
information', and YYYYY could contain a FAQ with common solutions to the
log entry.

Now, the presentation of this should for sure be part of the log
output/rendering.  Your proposed API allows a ?header which could be
used to embed such an id.  I've no concrete idea how it could be generated.

Certainly this could be a layer on top of the simple logging library,
but it might be handy to have it embedded at the lowest level.  What do
others think?


Attachment: signature.asc
Description: OpenPGP digital signature

MirageOS-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.