Re: [logs] Syslog payload format

From: Darren Reed (avalonat_private)
Date: Tue Dec 31 2002 - 10:27:27 PST

  • Next message: Tina Bird: "Re: [logs] Syslog payload format"

    In some mail from Balazs Scheidler, sie said:
    > 
    > > For that matter, using %(blah)foo just makes processing harder, not
    > > easier and definately not "obvious".
    > > 
    > > If I see "%(user)s %(host)s" in a string somewhere, I would expect it
    > > to be output somewhere as a whole, not in parts.  Since you're going
    > > down vararg lane (or stdargs), you may as well use proper value pairing,
    > > such as was suggested earlier - log(..., USER|STRING, username, ...)
    > 
    > Hmm... Is USER and STRING above a numeric constant, that what the operator
    > '|' makes me believe so. We have to solve two problems:
    > 
    > 1) identifying the tag
    
    USER is the tag, STRING is the type of data being passed.
    
    I chose constants rather than freeform text to get around the problem
    of different application developers using different tags for the same
    thing.  Is it a user or login id or what...give them a finite pool and
    let them choose one.
    
    > 2) create a handy interface for the programmer to format values
    [...]
    
    Now if this were java, each tag would be an object and the tag/value
    pair would just be the result of serialising it.
    
    Again, I don't necessarily want the programmer deciding how to format
    the values aside from saying what type of data it is.
    
    I don't want to see this kind of thing:
    "srchost", "%16s", caller
    
    Plus, I doubt you can currently teach gcc about that for printf-style
    format-arg checking.
    
    Darren
    _______________________________________________
    LogAnalysis mailing list
    LogAnalysisat_private
    http://lists.shmoo.com/mailman/listinfo/loganalysis
    



    This archive was generated by hypermail 2b30 : Tue Dec 31 2002 - 15:15:25 PST