You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@mynewt.apache.org by "Marko Kiiskila (JIRA)" <ji...@apache.org> on 2016/03/31 00:43:25 UTC
[jira] [Resolved] (MYNEWT-124) Log buffer issues
[ https://issues.apache.org/jira/browse/MYNEWT-124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marko Kiiskila resolved MYNEWT-124.
-----------------------------------
Resolution: Fixed
Made console_printf() stream out when using baselibc.
This same change cannot be made for log_printf(), given the interface to logging APIs. log_append() would need a way to append bytes one at a time to a log entry.
> Log buffer issues
> -----------------
>
> Key: MYNEWT-124
> URL: https://issues.apache.org/jira/browse/MYNEWT-124
> Project: Mynewt
> Issue Type: Bug
> Components: Misc
> Reporter: Christopher Collins
> Assignee: Marko Kiiskila
> Fix For: v0_8_0_rel
>
>
> When a message is written to a log, some buffers are allocated on the stack in various places in the code. This results in two issues:
> # Undue stack-size requirements placed on any task which uses sys/log.
> # Hard limit placed on the maximum length of a log line.
> There are two functions which exhibit this behavior:
> * log_printf (LOG_PRINTF_MAX_ENTRY_LEN = 128)
> * console_vprintf (CONS_OUTPUT_MAX_LINE = 128)
> I do not have a proposed fix. I believe Marko suggested streaming bytes to the destination, rather than writing to an intermediate buffer.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Re: [jira] [Resolved] (MYNEWT-124) Log buffer issues
Posted by Sterling Hughes <st...@apache.org>.
On 3/30/16 3:43 PM, Marko Kiiskila (JIRA) wrote:
>
> [ https://issues.apache.org/jira/browse/MYNEWT-124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Marko Kiiskila resolved MYNEWT-124.
> -----------------------------------
> Resolution: Fixed
>
> Made console_printf() stream out when using baselibc.
>
> This same change cannot be made for log_printf(), given the interface to logging APIs. log_append() would need a way to append bytes one at a time to a log entry.
>
This could be a buffer per-log that's passed in on init.
It's not great, but beats putting it on the stack.
sterling