Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ringbuffer sink #1307

Merged
merged 7 commits into from
Nov 9, 2019
Merged

Add ringbuffer sink #1307

merged 7 commits into from
Nov 9, 2019

Conversation

eudoxos
Copy link
Contributor

@eudoxos eudoxos commented Nov 8, 2019

Ringbuffer sink keeps user-given number of most recent log messages in
memory and returns them upon request (using the ringbuffer_sink::last
method). This can be useful for e.g. remote debugging of a running app.

Ringbuffer sink keeps user-given number of most recent log messages in
memory and returns them upon request (using the ringbuffer_sink::last
method). This can be useful for e.g. remote debugging of a running app.
@gabime
Copy link
Owner

gabime commented Nov 8, 2019

Thanks.
spdlog avoids 3rd party dependencies, so please use spdlog::details::circualr_q instead of boost's

@eudoxos
Copy link
Contributor Author

eudoxos commented Nov 8, 2019

Thanks.
spdlog avoids 3rd party dependencies, so please use [spdlog::details::circualr_q]

Done. I had to add circular_q::size() and circular_q::at(size_t) for random access without modifying the data.

include/spdlog/details/circular_q.h Outdated Show resolved Hide resolved
include/spdlog/sinks/ringbuffer_sink-inl.h Outdated Show resolved Hide resolved
@eudoxos eudoxos changed the title Add ringbuffer sink (requires boost::circular_buffer) Add ringbuffer sink (requires boost::circular_buffer Nov 9, 2019
@eudoxos eudoxos changed the title Add ringbuffer sink (requires boost::circular_buffer Add ringbuffer sink Nov 9, 2019
include/spdlog/details/circular_q.h Outdated Show resolved Hide resolved
@gabime gabime merged commit cff6644 into gabime:v1.x Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants