[sheepdog] [PATCH] sheepkeeper: a new cluster manager specialized for sheepdog
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Mon Nov 12 06:15:32 CET 2012
Thanks for your review. I'm preparing next patch which includes your review.
But I have one trivial question.
>
>> +
>> +#define log(fmt, ...) do { \
>> + if (!daemonized) { \
>> + fprintf(stdout, "%s, %d: " fmt, \
>> + __FILE__, __LINE__, \
>> + ## __VA_ARGS__); \
>> + } else { \
>> + syslog(LOG_INFO, "%s, %d: " fmt, \
>> + __FILE__, __LINE__, \
>> + ## __VA_ARGS__); \
>> + } \
>> + } while (0)
>
> Can we use eprintf?
>
>> +
>> +#define debug_printf(fmt, ...) do { \
>> + if (!daemonized) { \
>> + fprintf(stdout, "%s, %d (errno: %s): " fmt, \
>> + __FILE__, __LINE__, strerror(errno), \
>> + ## __VA_ARGS__); \
>> + } else { \
>> + syslog(LOG_DEBUG, "%s, %d (errno: %s): " fmt, \
>> + __FILE__, __LINE__, strerror(errno), \
>> + ## __VA_ARGS__); \
>> + } \
>> + } while (0)
>
> Can we use dprintf?
>
>> +
Aren't eprint and dprintf obsolete? In logger.h, there is a comment like
"don't use the following obsolete functions ..." on above of the
definitions of them.
If we can use eprintf and dprintf, the comment should be removed.
Thanks,
Hitoshi
More information about the sheepdog
mailing list