Re: [evlog-dev] binary data with evlsend?

Steve Woodruff <[email protected]> Fri, 31 Jan 2003 09:42:57 -0800 (PST)
Newsgroups gmane.linux.kernel.event-logging
Message-ID <[email protected]>
Hi Jim,

Well, yes i'd like to see it implemented for
two reasons:

1) the man page says it can be done
2) we'd like to post some binary events
   from shell scripts

Along the same lines.... i setup a template:

facility "moo";
event_type 0x9998;
attributes {
  int    data1;
  int    data2;
}
format string "(%data1%.......%data2%)"
END

and then did this from code:

evl_log_write(facility, event_type, severity, 0,
      "int", "100", "int", "200", "endofdata");

In my evlog plugin, i do something similar to:

sprintf(format, "(%%data1%%.......%%data2%%)");
status = evl_format_evrec_sprintf(entry, varbuf, 
format, recbuf, sizeof(recbuf), (size_t *)&reqlen);

two things:

1) how can i get around having to know the format
   string?  that complicates things!
2) the value stored in recbuf is never right. It
   is usually "(0.......0)"  Am i missing something?

Thanks!

/steve

--- James Keniston <[email protected]> wrote:
> 
> 
> 
> 
> This has never been implemented.  It shouldn't be
> tough -- basically write
> a version of libevl's evl_log_write/copy_attr_data
> that takes an array of
> strings rather than a va_list -- or else figure out
> how to morph the
> command's arg list into a va_list.  The former is
> presumably more portable.
> 
> Do you have a need for this?
> 
> Jim Keniston
> Linux Technology Center - Beaverton
> 
> 
>
|---------+-------------------------------------------->
> |         |           Steve Woodruff                
>   |
> |         |           <[email protected]>           
>   |
> |         |           Sent by:                      
>   |
> |         |          
> [email protected]|
> |         |           ceforge.net                   
>   |
> |         |                                         
>   |
> |         |                                         
>   |
> |         |           01/31/03 08:15 AM             
>   |
> |         |                                         
>   |
>
|---------+-------------------------------------------->
>  
>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
>   |                                                 
>                                                     
>                                            |
>   |       To:      
> [email protected]              
>                                                     
>                        |
>   |       cc:                                       
>                                                     
>                                            |
>   |       Subject:  [evlog-dev] binary data with
> evlsend?                                            
>                                                |
>   |                                                 
>                                                     
>                                            |
>   |                                                 
>                                                     
>                                            |
>  
>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
> 
> 
> 
> Does the evlsend utility currently support
> sending binary data?  The man page for
> evlsend gives an example of:
> 
> evlsend --facility LOCAL5 --type 65 -binary uchar
> 0x22
> string "Log this string too, but use default
> severity."
> 
> But running that, or other combinations of
> my own event types, gives an error:
> 
> ky[/home/sjwoodr/hmm]$ evlsend --facility LOCAL5
> --type 65 -binary uchar 0x22 string "Log this string
> too, but use default severity."
> Usage: evlsend -f | --facility facility -t | --type
> event_type
>              [-s | --severity severity]
>              [-m | --message message]
> 
> 
> 
> Is this supported?
> 
> Thanks!
> 
> /steve
> 
> 
> =====
>
----------------------------------------------------------
>  Steve Woodruff, N9OH @ 42.18N 88.34W,
> [email protected]
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> http://mailplus.yahoo.com
> 
> 
>
-------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld =
> Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> evlog-developers mailing list
> [email protected]
>
https://lists.sourceforge.net/lists/listinfo/evlog-developers
> 
> 
> 
> 
> 
>
-------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld =
> Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> evlog-developers mailing list
> [email protected]
>
https://lists.sourceforge.net/lists/listinfo/evlog-developers


=====
----------------------------------------------------------
 Steve Woodruff, N9OH @ 42.18N 88.34W, [email protected]

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com