On Tue, 27 Mar 2012, Dmitri Pal wrote:
On 03/27/2012 08:49 PM, david@lang.hm wrote:
as I am understanding it, the primary value of umberlog is that it gets us structured metadata (and more metadata) with no application changes.
I agree that we need to define additional functions to use for adding application structured data to the log.
IMO we need to define one interface that the application developers would use and start to migrate to and then evolve the infrastructure under it.
We should take selog or like, polish it warp around ul_log or pure syslog and have as an interface. While developers would migrate to it we will evolve the library and syslog implementation under it to serialize and format things into JSON XML etc but developer will have to change things once.
I think we differ in details, but not in overall strategy.
May be I am missing something but I fail to understand how changing from syslog() function to ul_syslog() is not an application change.
it could be that I am misunderstanding things, but as I understand it, if you just do a LD_PRELOAD of umberlog with no application changes the result is log messages with structured metadata around the raw log message.
If the programmer wants to add additional name/value pairs they can change individual syslog() calls to ul_syslog() and pass in parameters.
I actually don't expect many people to make a lot of use of this option, but in many cases something as simple as this is really going to be the right thing to do.
As I see it, the end result in terms of C is going to be four possible logging calls
1. syslog()
traditional interface, no app changes. structured metadata with one message field.
2. ul_syslog()
syslog() with some additional name/value pairs added
3. template based (ELAPI or similar)
a template that lists the names, followed by the types and values
4. memory structure based
a tree structure is created pointing to the names and values. a pointer to this structure is passed to the logging call.
This last one could be a variation or replacement for ul_syslog(), and I think it would be ideal if we could hash things out so that it can be just a newer variation of ul_syslog()
I think that all of these variations are appropriate to have (with the possible combination of #2 and #4)
David Lang