Skip to content

Debug logger doesn't play nice with non-blocking stderr #32

Description

@sagebind

The built-in logger currently does not play nice with standard error. Since we make standard I/O handles non-blocking while the Riptide runtime is in control, the logger will rightfully get an EAGAIN or equivalent error from time to time when trying to write a log and the buffer is full. We should update the logger to either:

  • Retry failed calls with some sort of delay. Presumably stderr will become ready shortly when this happens, and a retry might be good enough.
  • Make the logger a separate asynchoronous task that uses async I/O to write logs, and have the log macros simply append to that task's current buffer.

The latter seems like the more correct solution, but might be trickier, since loggers are global resources.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions