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

Fix filesink drop messages improved #479

Merged
merged 5 commits into from
Feb 20, 2023

Conversation

KjellKod
Copy link
Owner

PULL REQUEST DESCRIPTION

Incorporates #478

Commit 6c6122f introduced a bug where 99 out of 100 logs were actually dumped. Bug discovered while using two sinks : FileSink and the stdout example sink. I had every messages in stdout sink, but very few in the log file.

Bug Description

The bug would happen when enough messages were put into a buffer for it to flush.
The unit tests were not setup to trigger buffer flushing.

Fix description

Testing

  • [ x] This new/modified code was covered by unit tests.

  • [x ] (insight) Was all tests written using TDD (Test Driven Development) style?

  • [ x] The CI (Windows, Linux, OSX) are working without issues.

  • [ x] The testing steps 1 - 2 below were followed

step 1

mkdir build; cd build; cmake -DADD_G3LOG_UNIT_TEST=ON ..

// linux/osx alternative, simply run: ./scripts/buildAndRunTests.sh

step 2: use one of these alternatives to run tests:

  • Cross-Platform: ctest
  • or ctest -V for verbose output
  • Linux: make test

@KjellKod KjellKod mentioned this pull request Feb 20, 2023
6 tasks
@KjellKod KjellKod merged commit 4f1224b into master Feb 20, 2023
@KjellKod KjellKod deleted the fix-filesink-drop-messages__improved branch February 20, 2023 13:16
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