Skip to content

Add a log collector to capture stderr messages from the C library #4

@chad-earthscope

Description

@chad-earthscope

The C library writes warnings and errors to stderr in some cases that are difficult to propagate out to the caller.
A facility in libmseed exists to accumulate errors avoid them going to the console via ms_loginit().

pymseed should accumulate the warnings and errors to avoid them going to the console.
API would then be needed to access the accumulated messages and return them if desired.

Likely starting direction is to add log accumulation setup in pymseed/__init__.py so it happens
at import time is (hopefully) global for all other calls.

The logging config is thread-local, so when threading is used in python each one will get the default
global logging (without accumulation). An option to handle this is to add a simple configure_thread_logging()
that can be called during thread initialization or in user-code at the start of a thread and have it use

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions