Replies: 5 comments 4 replies
-
I do not believe it is yet possible to remove the APR dependency as it provides essential functionality (e.g. apr_file_write, apr_proc_create) that is not yet in the C++ standard library.
I suggest changing the LOG4CXX_DEBUG family of macros to require logged values be copy-constructible/move-constructible. This would allow us to implement the equivalent to "asynchronous loggers" that is already in Log4j2, and for users to see performance benefits without any code change. The LoggingEvent would need to hold a |
Beta Was this translation helpful? Give feedback.
-
|
I messed around a bit with a new possible way to log stuff tonight: https://github.com/rm5248/cxx-logger-testing/tree/main I have no idea if it is faster or not; a lot of work would have to be done in order to see what performance hit(if any) this would cause. I expect that there could still be some optimizations to do. Some parts that I consider important:
Feedback/thoughts would be good. |
Beta Was this translation helpful? Give feedback.
-
Log4cxx must not go down this path. Backward compatibility of Log4cxx is its critical contribution. Given the millions of lines of source code already out there using it, maintaining source code compatibility should be the primary objective. There are already lots of example "new way to log stuff" projects out there. Also note that even Rust uses macros for logging. |
Beta Was this translation helpful? Give feedback.
-
Good to hear.
That is above my pay grade. Even Herb Suttor, when asked to include logging in his new experimental C++ 'syntax 2' (Cpp2) did not want to take that on. He pushed the questioner to use existing C++1 code libraries (spdlog) |
Beta Was this translation helpful? Give feedback.
-
|
I had previously thought we could provide users performance benefits without any code change by introducing asynchronous loggers as the default. I have since realised this would not be a good idea because:
Given I do not see a technical need for a new ABI arrizing soon, one option we have would be to relabel the 1.6 features as 2.0 and bump the ABI version now. Thoughts? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Whenever we do a new major release of Log4cxx(also breaking ABI compatibility), what should we do? My current thoughts are as follows:
constexprto a bunch of functions? I've been reading up on howconstexprworks, so perhaps some more thoughts on this laterLOG4CXX_DEBUGfamily of macros and instead use variadic templates?Features to definitely keep:
What other thoughts do people have?
In terms of timelines, I wouldn't expect a new version to be done before the end of 2026, so this is a pretty long timeline.
Beta Was this translation helpful? Give feedback.
All reactions