poco
poco copied to clipboard
SQLChannel stops logging on LoggingSubsystem shutdown
Describe the bug
- [x] last log messages not logged on shutdown
- [x] code after main while loop in run is never reached (thread abruptly terminated?)
- [x] feature: add
store-and-forward
mode - [ ] create a
Util::ServerApplication
-basedDBLogger
sample inPoco::Data
which:- connects to a database
- logging thread produces some logs via
SQLChannel
instore-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
- monitors the directory where files with *.sql extension (containing SQL inserts statements) are saved by
- use sqlite db for the sample (like other
Poco::Data
samples)
I get this static analysis warning in SQLChannel dtor:
/poco/Data/src/SQLChannel.cpp:112:3: Call to virtual method 'SQLChannel::close' during destruction bypasses virtual dispatch [clang-analyzer-optin.cplusplus.VirtualCall]