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

Re: [MirageOS-devel] Logs



Le vendredi, 16 octobre 2015 Ã 12:07, Jeremy Yallop a Ãcrit :
> > Maybe. As said above I'll try to see if I can find a convenient way to 
> > generalize the notion of level into a notion of "tag".
>  
> The Async logging framework takes a similar approach, although it
> supports levels as well: each logging function accepts an optional
> multi-map of tag metadata:
>  
> val raw : ?time:Core.Std.Time.t -> ?tags:(string * string) list ->
> t -> ('a, unit, string, unit) format4 -> 'a
> https://ocaml.janestreet.com/ocaml-core/111.28.00/doc/async_extra/#Log

Two comments here:   

1. On the above interface, I think it's better if the tag names are handled by 
the library as it gives the opportunity to maintain the global list of existing 
tags which is useful for user interfaces (that is provided tags aren't created 
dynamically).

2. My initial claim that sources and levels could be unified under the notion 
of tags isn't practical. The thing is that you want absence of logging to be 
fast and as such you want the test for reporting or not to be fast and I think 
it's better if before hitting the reporter we boil down this to a single 
comparison on the log source current level rather than determine if a tag set 
is being matched by the logging request.

Daniel

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

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