poco icon indicating copy to clipboard operation
poco copied to clipboard

SQLChannel stops logging on LoggingSubsystem shutdown

Open aleks-f opened this issue 10 months ago • 1 comments

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-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 avatar Apr 13 '24 18:04 aleks-f

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]

matejk avatar Apr 14 '24 16:04 matejk