logging: Use vprintk for string formatting by default
Previously, _prf function was used when present and _vprintk was used otherwise. _prf supports reacher formatting but at cost of 3k flash and >250 bytes on stack. Stack usage then depended on which function was used and that was causing troubles when trimming stack sizes. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
73efd78432
commit
987586d914
2 changed files with 8 additions and 7 deletions
|
@ -115,7 +115,7 @@ static int print_formatted(const struct log_output *log_output,
|
|||
|
||||
va_start(args, fmt);
|
||||
#if !defined(CONFIG_NEWLIB_LIBC) && !defined(CONFIG_ARCH_POSIX) && \
|
||||
!defined(CONFIG_LOG_DISABLE_FANCY_OUTPUT_FORMATTING)
|
||||
defined(CONFIG_LOG_ENABLE_FANCY_OUTPUT_FORMATTING)
|
||||
length = _prf(out_func, (void *)log_output, (char *)fmt, args);
|
||||
#else
|
||||
_vprintk(out_func, (void *)log_output, fmt, args);
|
||||
|
@ -553,7 +553,7 @@ void log_output_string(const struct log_output *log_output,
|
|||
}
|
||||
|
||||
#if !defined(CONFIG_NEWLIB_LIBC) && !defined(CONFIG_ARCH_POSIX) && \
|
||||
!defined(CONFIG_LOG_DISABLE_FANCY_OUTPUT_FORMATTING)
|
||||
defined(CONFIG_LOG_ENABLE_FANCY_OUTPUT_FORMATTING)
|
||||
length = _prf(out_func, (void *)log_output, (char *)fmt, ap);
|
||||
#else
|
||||
_vprintk(out_func, (void *)log_output, fmt, ap);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue