sentry-native icon indicating copy to clipboard operation
sentry-native copied to clipboard

Feature request: Provide extra context to custom logger

Open kristjanvalur opened this issue 2 years ago • 2 comments

Description

Feature request

It would be useful for the custom logger to know if it is being called during a crash handling call. The reason is that in this case, it may decide to send logs directly to stderr, rather than use whatever custom log pipeline it was using previously. During crash handling, the "standard" log pipeline may be well defunct.

We don't want to duplicate all logs during init and regular phase (sending it to custom log pipe and stderr).

During crash handling, progress is logged using INFO level, so the level also cannot be used to decide when to send logs to stderr, rather than custom log pipe.

This could be done by providing a sentry_get_status() api, or by providing additional args to logging. Possibly passing a flag along with the level.

When does the problem happen

  • [ ] During build
  • [ ] During run-time
  • [x] When capturing a hard crash

kristjanvalur avatar May 12 '22 14:05 kristjanvalur

Hey @kristjanvalur, please send this request to [email protected]. The support team will go ahead and create a feature request if appropriate.

Kobby-Bawuah avatar May 16 '22 14:05 Kobby-Bawuah

That seems a bit roundabout, but okay, I guess.

kristjanvalur avatar May 16 '22 14:05 kristjanvalur

Closing as transferred to support. Feel free to reopen at any time.

supervacuus avatar Jan 05 '23 16:01 supervacuus