[sheepdog] rename printf functions

Liu Yuan namei.unix at gmail.com
Wed Aug 7 11:04:29 CEST 2013


On Wed, Aug 07, 2013 at 05:44:53PM +0900, MORITA Kazutaka wrote:
> Hi all,
> 
> 1. How about introducing the following functions?
> 
>    sd_emerg()  to log message with log level SDOG_EMERG
>    sd_alert()  to log message with log level SDOG_ALERT
>    sd_crit()   to log message with log level SDOG_CRIT
>    sd_err()    to log message with log level SDOG_ERR
>                (sd_eprintf will be removed)

sd_error() looks more consistent with others.

>    sd_warn()   to log message with log level SDOG_WARN
>    sd_notice() to log message with log level SDOG_NOTICE
>    sd_info()   to log message with log level SDOG_INFO
>                (sd_iprintf will be removed)
>    sd_debug()  to log message with log level SDOG_DEBUG
>                (sd_dprintf will be removed)
> 
> 2. How about using sd_eprintf (or sd_err) instead of fprintf(stderr)?
> 
>    The output won't change even in collie because the result of
>    sd_eprintf is same as fprintf(stderr) when logger is not
>    initialized.
> 

Both looks good to me.

Thanks
Yuan




More information about the sheepdog mailing list