Hi Simon

2017-09-17 6:23 GMT+09:00 Simon Glass <s...@chromium.org>:

> +
> +
> +To Do
> +-----
> +
> +There are lots of useful additions that could be made. None of the below is
> +implemented! If you do one, please add a test in test/py/tests/test_log.py
> +
> +Convenience functions to support setting the category:
> +
> +   log_arch(level, format_string, ...) - category LOGC_ARCH
> +   log_board(level, format_string, ...) - category LOGC_BOARD
> +   log_core(level, format_string, ...) - category LOGC_CORE
> +   log_dt(level, format_string, ...) - category LOGC_DT


I do not want to see any more proliferation of log functions...



> +Convenience functions to support a category defined for a single file, for
> +example:
> +
> +   #define LOG_CATEGORY   UCLASS_USB
> +
> +all of these can use LOG_CATEGORY as the category, and a log level
> +corresponding to the function name:
> +
> +   logc(level, format_string, ...)
> +   pr_panic(format_string, ...)
> +   pr_crit(format_string, ...)
> +   pr_err(format_string, ...)
> +   pr_warn(format_string, ...)
> +   pr_note(format_string, ...)
> +   pr_info(format_string, ...)
> +   pr_detail(format_string, ...)
> +   pr_debug(format_string, ...)
>


Linux uses:

pr_emerg(fmt, ...)
pr_alert(fmt, ...)
pr_crit(fmt, ...)
pr_err(fmt, ...)
pr_warn(fmt, ...)
pr_notice(fmt, ...)
pr_info(fmt, ...)
pr_debug(fmt, ...)


Please do not invent similar, but different APIs.



-- 
Best Regards
Masahiro Yamada
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to