From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gihan Munasinghe Subject: Re: [PATCH] syslog support to xentoollog Date: Mon, 07 Jun 2010 12:36:02 +0100 Message-ID: <4C0CD9A2.8010002@flexiant.com> References: <4C06CF97.8070002@flexiant.com> <4C07BCDC.8020808@flexiant.com> <19464.58055.990300.132491@mariner.uk.xensource.com> <4C099F90.3080205@flexiant.com> <19468.51942.998644.811395@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <19468.51942.998644.811395@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: "xen-devel@lists.xensource.com" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org 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