* Util::Application: unified argument handling to reduce code duplication
* Syntax fix for Util::Application on Win32
* Util::Application: fix for _WIN32
* Explicitly delete and default constructors of Subsystem.
* Data::TypeHandler: suppress MSVC warning about implicitly deleted destructor
* Poco::Util: deleted/defaulted constructors, override annotations
* Application, ServerApplication: some cleanup
* Default member initializers for Util::Option
* Poco::Util: more deleted/defaulted constructors, override annotations
* Overload of AbstractConfiguration::keys() that returns the result
* Util::LocalConfigurationView as a variant of ConfigurationView
* Util::SystemConfiguration: use map of functions
* Util: update copyright notices
* Util::AbstractConfigurationView
* Poco::Util::Units::abs template
* Overloads for Application::getApplicationPath and getApplicationDirectory
* Potential fix for code scanning alert no. 1696: No raw arrays in interfaces
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for code scanning alert no. 1697: Commented-out code
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Documentation fix for AbstractConfiguration
* More fixes for code scanning alert no. 1696: No raw arrays in interfaces
---------
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* fix(SharedLibrary): Missing DLLs not reported #5069
* fix(CMake): not producing proper binary names #5070
* fix(SharedLibrary): disable shared lib tests in static build #5069
* fix(misc): add pdjson links to gitignore, remove unused var in SharedLibrary, harden TaskManagerTest
* fic(ci): separate oracle and sqlserver odbc (out of disk space) (#5075)
* fic(ci): separate oracle and sqlserver odbc (out of disk space)
* use oracle odbc driver
* use oracle free
* ad db user
* postpone adding user after build
* remove default tablespace (does not exist)
* reinstate all ci jobs
* add postgresl odb tests to ci
* remove spurious syminks
* fix gitignore (pdjson)
* Remove VS projects #5076
* chore: revert leftover ODB IP address
* fix(CodeQL): float comparison alerts
* fix: compile errors
* chore: upgrade asan to macos-14 (tryout)
* fix: .gitignore symlinks; XML Makefile wrong pattern
* Optimize PatternFormatter and Timezone performance #5078
PatternFormatter:
- Cache node name (Environment::nodeName()) to avoid repeated syscalls
- Add extractBasename() for efficient %O format specifier
- Add string reserve(128) to reduce reallocations during formatting
Timezone:
- Cache UTC offset to avoid repeated syscalls (8x speedup for %L patterns)
- Auto-detect TZ environment variable changes to invalidate cache
- Add reloadCache() method for explicit cache refresh
Tests:
- Add TimezoneTest::testUtcOffsetCaching()
- Add PatternFormatterTest::testExtractBasename()
* fix: use Path::separatorin extractBasename #5078
* Add Benchmark #5080
* enh(Logging): move constructors for Message and Logger #5078
* chore(AsyncNotificationCenter): eliminate MSVC warnings
* enh(build): c++20 support #5084
* feat(CppUnit): print class name
execute all named tests (not only the first one)
accept test name with class (eg. testrunner LoggerTest::testLogger) #5083
* feat(Benchmark): Add Logger/FastLogger comparison benchmarks and Windows support
- Add LoggerBench.cpp with AsyncChannel vs FastLogger benchmarks
- Add compare.sh (Linux/macOS) and compare.ps1 (Windows) scripts
- Add LOGGER_BENCHMARK.md with cross-platform benchmark results
- Update README.md with Windows build instructions (Ninja, CMAKE_PREFIX_PATH)
- Add error message when -- options are used on Windows (should use /)
- Update CMakeLists.txt and Makefile to include LoggerBench #5080
* feat(FastLogger): #5078
FastLogger provides a Poco-compatible wrapper around the Quill logging
library, offering significant performance improvements over AsyncChannel
through lock-free SPSC queues and backend thread processing.
Key features:
- Drop-in replacement for Poco::Logger with FastLogger::get()
- Support for all standard Poco channels (Console, File, Rotating, etc.)
- XML/properties configuration via FastLoggerConfigurator
- Thread affinity for backend worker on Linux and Windows
- Log file rotation with size and time-based policies
Performance (CPU time - calling thread latency):
- Linux: 31-70x faster than AsyncChannel
- Windows: 23-87x faster than AsyncChannel
- macOS: Limited improvement due to lack of thread affinity support
New files:
- Foundation/include/Poco/FastLogger.h
- Foundation/src/FastLogger.cpp
- Util/include/Poco/Util/FastLoggerConfigurator.h
- Util/src/FastLoggerConfigurator.cpp
- dependencies/quill/ (header-only Quill 7.5.0 library)
* fix(cmake): disable FastLogger on emscripten (not supported) #5078
* feat(FastLogger): add cpuAfinity config parameter #5087
* fix(FastLogger): Fix lock-order-inversion in FastLogger (TSAN) #5078
* fix(cmake): build not stripping release binaries #5085
* fix(PCRE): fails to compile with clang/c++20 #5131
* feat(AsyncChannel): add CPU affinity property #5087
* feat(SpinlockMutex): make it adaptive #5132
* feat(AsyncChannel): add CPU affinity property #5087
* chore: remove leftover file commited by mistake
* feat(build): allow FastLogger to be fully disabled at build time #5078
Build system changes:
- Add POCO_NO_FASTLOGGER compile definition in CMake when ENABLE_FASTLOGGER=OFF
to prevent Config.h from auto-enabling FastLogger
- Add ifdef guards around FastLogger tests in LoggingTestSuite.cpp
- Exclude FastLoggerTest.cpp and FastLoggerChannelsTest.cpp from CMake build
when FastLogger is disabled
- Add POCO_NO_FASTLOGGER support to Make build system for Foundation and Util
- Add CI jobs to verify builds work without FastLogger (CMake and Make)
Code changes:
- Add LoggingConfigurator::configure() convenience method for quick logging setup
* fix(ci): testrunner args
* chore(progen): remove leftover script #5076
* fix(test): give ANC a bit more time to process
* fix(ci): set env before test run
* chore(doc): quill license
* feat(Channel): add log(Message&&) #5133
* fix(ci): set env before test run
* fix(TestRunner): don't search children #5083
* feat: lock-free queues #5134
* feat(Benchmark): various comparisons
* chore: cleanup benchmark
* fix(SharedLibrary): Missing DLLs not reported #5069
* fix(CMake): not producing proper binary names #5070
* fix(SharedLibrary): disable shared lib tests in static build #5069
* fix(misc): add pdjson links to gitignore, remove unused var in SharedLibrary, harden TaskManagerTest
* fic(ci): separate oracle and sqlserver odbc (out of disk space) (#5075)
* fic(ci): separate oracle and sqlserver odbc (out of disk space)
* use oracle odbc driver
* use oracle free
* ad db user
* postpone adding user after build
* remove default tablespace (does not exist)
* reinstate all ci jobs
* add postgresl odb tests to ci
* remove spurious syminks
* fix gitignore (pdjson)
* Remove VS projects #5076
* chore: revert leftover ODB IP address
* fix(CodeQL): float comparison alerts
* fix: compile errors
* chore: upgrade asan to macos-14 (tryout)
* fix(CI): Github macos-13 runner is deprecated, use macos-15-intel to run tests on Intel macOS
---------
Co-authored-by: Matej Kenda <matejken@gmail.com>
* enh(cmake): Add option POCO_CXX20 to enable standard C++20 and related changes.
* chore(cmake): do not allow C++20 setting for compilers that do not support it properly.
* fix(NetSSL_Win): indentation.
* 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 <aleks-f@users.noreply.github.com>
Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
* chore(Trace): add dev env settings
* add(Trace): init add Poco::trace and libbacktrace files
* feat(Exception): generate stack trace if enabled at compile time
* chore(DNSSD): remove binaries from git
* fix(Trace): build
* chore(ci): exclude exception text tests for trace build; add debug test script params
* chore(build): mac (dl)
* chore(cmake): Changes to build Trace with CMake.
* chore(cmake): Changes to build Trace on Windows
* chore(cmake): Improvements to include trace sample.
* chore(cmake): Fixes to properly build/link Trace on Linux
* chore(cmake): add_definitions --> add_compile_definitions
* chore(cmake): Build Trace as static and don't export it.
* chore(make): Link Trace with built-in libbacktrace on Linux
* chore(Trace): remove unnecessary sources for libbacktrace.
* chore(github): enable trace on a few github checks
* chore(cmake): Build Trace with clang++ on Linux.
* chore(cmake): Properly set POCO_ENABLE_TRACE globally when needed.
* fix(cmake): Trace: corrected include for clang on Linux
---------
Co-authored-by: Matej Kenda <matejken@gmail.com>
* enh(Application): remove useless function
* enh(Application): add ignoreUnknownOptions() function
* fix(OptionSet): comment error
* enh(Application): public two functions: getApplicationPath/getApplicationDirectory
* enh(Application): make findAppConfigFile function public and virtual
* style(Application): code alignment
* fix(Application): do not re-throw exception
* enh(poco): Replace deprecated comments with C++ deprecated attribute.
* enh(Poco): Replace some deprecated functionality in Poco sources. (#4426)
* enh(Poco): Replace more deprecated functionality in Poco sources. (#4426)
* fix(CMake): Variable BUILD_SHARED_LIBS must be defined properly to create valid binaries.
* enh: Code improvements done while resolving deprecated functionality (#4426)
* Un-deprecate LocalDateTme (#4426)
* enh(Poco): Replace usage of deprecated functionality with other functions/classes (#4426)
* chore(SSL): temporarily un-deprecate SSL-related functionality (#4426)
* chore(SSL): temporarily un-deprecate old MongoDB protocol functionality (#4426)
* enh(Poco): Minor Hash improvements (#4426)
* enh(Foundation): Compile deprecated hash tests only when POCO_TEST_DEPRECATED is enabled (#4426)
* enh(Net): Compile deprecated Socket::select functionality only when POCO_TEST_DEPRECATED is enabled (#4426)
* enh(Bonjour): Replace deprecated Socket::select with PollSet (#4426)
* enh(Poco): Introduce POCO_DEPRECATED macro to have the ability to disable deprecation warnings in applications (#4426)
* test(ODBC): add few asserts to testStoredProcedureDynamicVar
* fix(ODBC): rename DynamicAny -> DynamicVar in tests
* fix(ODBC): make Dignostics static members inline to prevent explicit instantiation warnings on windows
---------
Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
* feat(format): Add string_view format type spec #4409
* chore(Types): add demangle
* fix(Data): Oracle failing ODBC tests #4368
* fix some CQL and fuzz warnings; add Var::typeName()
* fix(build): -std=c++17 and c11
* fix windows build
* fix(Foundation): test apps vs projects c++17
* chore(build): remove uneeded compiler flag
* fix(VarHolder): number of digits range check for int->float conversion (reported by CIFuzz)
* fix(test): CIFuzz
* fix(CIFuzz): another attempt
* fix(progen): add LanguageStandard (stdcpp17, stdc11); regenerate vs170 projects
* fix(CiFuzz): add int->float precision loss barrier; fix erroneous number of digits logic
* enh(Var): silent loss of precision on int->float conversion #4423
* enh(Var): silent loss of precision on int->float conversion #4423
* chore(build): remove old build files
* chore: fix missing parens warning
* enh(Thread_POSIX): prevent double-joining; add error description to exceptions
* fix(Data): unresolved Column<long> linkage in test
* fix(demangle): determine type name from template parameter; add eror diagnostic for demangling failures
* chore(buildwin): remove old vs versions from build and progen scripts; update documentation
* chore(buildwin): remove leftover closing curly
* fix(platform): MinGW Compile and link errors: undefined reference to `WinMain'
* fix(platform): MinGW compile UUID tests (conflicting UUID defined as GUID in rpcdce.h via windows.h)
* Remove _WIN32_WCE macro
Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. First remove
all macro usages from our own files.
* Remove WinCE support from build files
Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. Remove all
references from build systems / scripts.
* Remove Windows CE related source and header files
Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. First remove
all macro usages from our own files.
* Remove wcelibcex folder
Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. First remove
all macro usages from our own files.
* Remove rest Windows CE mentions
There where some Windows CE mentions left. Remove those.
* Update Windows CE documentation
We should keep documentation some time so people can find reason for
remove.
---------
Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
* add sendfile method for streamsocket
* add mswsock.lib to the project files and templates
* remove /DPOCO_NO_AUTOMATIC_LIBS for cmake windows build
* merge from upstream
* merge from upstream
* fix code stile
add NotImplemented exception for unsupported platforms
exculude <sys/sendfile.h> for POCO_EMSCRIPTEN, because https://
github.com/emscripten-core/emscripten/pull/16234
* add iostream include for std::cout
* fix compilation for emscripten (wrap sendfile)
Consider following situation. A class owns a timer. In destructor of that class we call .cancel() asynchronous on timer before it's destruction.
Now timer is executing cancel in it's own internal thread, while it's doing that destructor of timer is called from owner's destructor. Timer destructor enqueues stop notification. If that enqueue is happening just after while loop from cancel notification, stop notification is gonna be dropped and timer will never stop.
Fix: Add new method in TimedNotificationQueue which will return a notification regardless of the time it needs to be executed.
Get number of pending tasks in the queue. Flush out that many notifications from queue while taking special consideration of pending Stop and Cancel notifications.
Add test for new method in TimedNotificationQueue and fix cancel all tests to actually check if notification got executed.
fixes#3986
Consider following situation. A class owns a timer. In destructor of that class we call .cancel() asynchronous on timer before it's destruction.
Now timer is executing cancel in it's own internal thread, while it's doing that destructor of timer is called from owning class. Timer destructor enqueues stop notification. If that enqueue is happening just after while loop from cancel notification, stop notification is gonna be dropped and timer will never stop.
fixes#3986
Co-authored-by: Vojin Ilic <vilic@nvidia.com>
* try fix compilation for solaris
* this commit for issue #3843 and #3643
changes in Types.h allow ignore problem with declaration of std::int8_t. int8_t can be defined as char or signed char. IMHO we need strong types for Poco::Int's
Envelop.cpp contains initializer for EVP_CIPHER_CTX_init, because this function prototype depends on openssl version.
Application.cpp contains includes especial for SOLARIS, for ioctl support
ClassLoaderTest.cpp and SharedLibraryTest.cpp contains changes because loadlibrary(dlopen) doesn't load library from current directory by default
LocalDateTimeTest.cpp contains changes because SOLARIS use std::tm without tm_gmtoff
* fix : define of SOLARIOS OS in LocalDateTimeTest
* remove unnecessary wrapper
* fix output dir for windows build with multi-config build
* try to fix bug with unixodbc version in linux-builds
[read here](https://github.com/microsoft/linux-package-repositories/issues/36)
* try to fix bug with unixodbc version in linux-builds
[read here](https://github.com/microsoft/linux-package-repositories/issues/36)
* fix : warning in main cmake for if-condition for multi-config build
fix : error for linux-gcc-make-cxx20, use --allow-downgrades for unixodbc
* fix : warning for cmake windows builds
revert changes for linux-gcc-make-cxx20
* revert ci.yml, remove unixodbc version
* try re-run build
---------
Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>
* Test that enumerates lots of elements with the same name
* Use map from key to count instead of multiset
Co-authored-by: Alexander Gololobov <{ID}+{username}@users.noreply.github.com>
Timer is implemented with internal queue. If a user wants to cancel all pending tasks it can call .cancel to schedule CancelNotification.
As a part of processing of CancelNotification it will just flush the whole queue. It does have special processing for StopNotification so that Timer destruction doesn't get blocked.
Now if we first schedule async cancel and before this first cancel is processed we schedule another cancel but this time a sync second one will block because it is never notified that all tasks are canceled, _finished event is never set on that flushed CancelNotification.
Fix: add diffrent processing in case of CancelNotification to set all of it's _finished events.
Also add a test for this situation.