[sheepdog] [PATCH v5] logger: rename and change a role of select_log_formatter()

Liu Yuan namei.unix at gmail.com
Wed Feb 6 07:19:51 CET 2013


On 02/05/2013 05:46 PM, Hitoshi Mitake wrote:
> --- a/sheep/sheep.c
> +++ b/sheep/sheep.c
> @@ -432,6 +432,7 @@ int main(int argc, char **argv)
>  	struct cluster_driver *cdrv;
>  	struct option *long_options;
>  	const char *log_format = "default";
> +	static struct logger_user_info sheep_info;

Do we really need logger_user_info? Seems that you assume other
formatter should use it when he wants to add more field. But now we only
have json formatter, so for now it is only json related, and default
formatter doesn't need it. So I'd suggest just hardcode port in the
json_log_formatter() is good enough. Even if we need this structure,
I think we'd better put logger_user_info in log.c instead of sheep.c.

Thanks,
Yuan



More information about the sheepdog mailing list