WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] syslog support to xentoollog

Ian Jackson wrote:
Gihan Munasinghe writes ("[PATCH] syslog support to xentoollog"):
Going forward I would like to suggest that xentoollog.h file should only have generic functions, except for xtl_createlogger_* functions. Logger type specific function should not be included(e.g xtl_stdiostream_set_minlevel ) this will make sure outside code can switch from one logger to another (from stdiologger to syslogger vice versa) with out breaking the code.

In general this is a good idea but it's not sensible to make it a hard
and fast rule.  Eg, if you had a function xtl_syslog_change_facility()
it wouldn't make any sense for it to be implemented by stdiostream.

Should a call like xtl_syslog_change_facility() given out directly to the library users. this call can be wrapped with in a more generic call like
xtl_cahnge_log_place(struct xentool_logger , void *new_place);

In stdiostream implementation this can be caste to a stream and in syslogger implementation this can be cast as a facility. If some logger doesn't want to implement that we can have empty implementation

Well may be it should not be a hard and fast rule, but more of a best practice scenario then.


Thanks
Gihan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel