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

DBLogger sample #4750

Closed
1 task
aleks-f opened this issue Oct 30, 2024 · 0 comments · Fixed by #4759
Closed
1 task

DBLogger sample #4750

aleks-f opened this issue Oct 30, 2024 · 0 comments · Fixed by #4759
Assignees

Comments

@aleks-f
Copy link
Member

aleks-f commented Oct 30, 2024

  • create a Util::ServerApplication-based DBLogger sample in Poco::Data which:
    • connects to a database
    • logging thread produces some logs via SQLChannel in store-and-forward mode
    • forwarding thread:
      • monitors the directory where files with *.sql extension (containing SQL inserts statements) are saved by SQLChannel in store-and-forward mode
      • executes the queries in the *.sql files
        • in case of success, deletes the *.sql file
        • in case of error, renames the offending file from *.sql to *.err
      • any files with extension different from *.sql are ignored
    • use sqlite db for the sample (like other Poco::Data samples)
@aleks-f aleks-f changed the title create a Util::ServerApplication-based DBLogger sample in Poco::Data which: DBLogger sample Oct 30, 2024
@aleks-f aleks-f added this to 1.14 Oct 30, 2024
@aleks-f aleks-f added this to the Release 1.14.0 milestone Oct 30, 2024
@matejk matejk moved this to In Progress in 1.14 Nov 6, 2024
matejk added a commit that referenced this issue Nov 6, 2024
matejk added a commit that referenced this issue Nov 13, 2024
matejk added a commit that referenced this issue Nov 18, 2024
* sample(DBLogger): New sample to demonstrate DB logging to a file. (#4750)

* sample(DBLogger): Create messages via SQL logger in a thread (#4750)

* sample(DBLogger): Save messages from SQL files to an SQL database (works with SQLite) (#4750)

* chore(Makefile): Data samples depend on PocoUtil (#4750)

* sample(DBLogger): Refactored DBLogger with std::filesystem::directory_iterator and std::thread.

* sample(DBLogger): Add missing include <condition_variable>

* sample(DBLogger): Extracted log scanning and inserting functionality to class SQLLogInserter.

* sample(DBLogger): Create new logging table only when using demo messages option.

* feat(DBLogger): VS projects

* sample(DBLogger): Acquire options from configuration file.

* feat(DBLogger): regenerate VS projects (progen file change)

* sample(DBLogger): Add example DBLogger.properties file.

* sample(DBLogger): Process as much as possible when stopping processing.

* sample(DBLogger): Meaningful defaults in properties file.

* sample(DBLogger): Verify validity of database session on startup.

* sample(DBLogger): Configure demo SQL channel in properties file.

* chore(DBLogger): style and warnings

---------

Co-authored-by: Aleksandar Fabijanic <[email protected]>
Co-authored-by: Alex Fabijanic <[email protected]>
@github-project-automation github-project-automation bot moved this from In Progress to Done in 1.14 Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants