swebb2066 commented on PR #218:
URL: https://github.com/apache/logging-log4cxx/pull/218#issuecomment-1597924110
I believe this problem is somewhat pervasive (it is a pattern used in other
places) and requires a more extensive change.
The `IMPLEMENT_LOG4CXX_OBJECT` macro which creates a statically initialised
variable (e.g. JSONLayoutRegistration) using the code:
```
namespace log4cxx { namespace classes { \
const ::log4cxx::helpers::ClassRegistration& object##Registration =
object::registerClass(); \
} }
```
was placed in the jasonlayout.cpp translation unit instead of loader.cpp.
The jasonlayout.cpp translation unit is not included in log4cxx.so as no other
log4cxx translation unit references JSONLayout.
I think we should move all instances of `IMPLEMENT_LOG4CXX_OBJECT` to
loader.cpp.
Is there another way?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]