Skip to content

Things I expect for a native printf logger #16

@2bndy5

Description

@2bndy5

I wanted to jot these thoughts down somewhere.

  • By default, use natively available printf() (which is currently achieved by macro printf_P)
  • If passed a buffer (as opposed to a stream pointer), then log all messages to the buffer, and let the user manage the buffer size/etc... This stipulates that snprintf() is natively available (which may not be the case for MCUs like the RP2040 -- though the Arduino's avr/pgmspace.h does provide access to snprintf()).
  • By default, use our own parser instead of the natively available printf() functionality. However, allow a bypass function (call it logf()) to allow user to use native printf() parser. This could be done with a macro, but it seems inexpensive to implement with a logf() function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions