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

Feature Request: Integration with spdlog logging library

Open kaptaanalt opened this issue 2 years ago • 2 comments

https://github.com/gabime/spdlog/

Is it possible to have integration with spdlog library? Such that all logs above a particular log-level are captured by sentry(maybe as breadcrumbs) and sent when hardcrash happens or also on next message capture?

I saw an example here - https://github.com/getsentry/sentry-native/issues/298#issuecomment-644684432 but this seems to be other way around - sentry logger using spdlog??

kaptaanalt avatar May 13 '22 09:05 kaptaanalt

I doubt we will work on this ourselves. But we very appreciate contributions. For example, the Qt integration similarly captures Qt log messages as breadcrumbs, was also contributed by external developers. That might be a good starting point to look at.

Swatinem avatar May 17 '22 20:05 Swatinem

You should be able to accomplish this by adding a custom logging sink class that would create breadcrumbs, then attaching it to a logger

p0358 avatar May 31 '22 09:05 p0358