You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by Peter Steiner <pe...@hugwi.ch> on 2006/12/12 09:23:41 UTC
static builds and class registration
Hello!
Usually I'm using the shared build of log4cxx. But once in while I'm
testing the static build. The current static build can't find the
SizeBasedTriggeringPolicy class when using a property configuration.
Should SizeBasedTriggeringPolicy::registerClass() be called from
Class::registerClasses(), or where should this class be registered?
Regards, Peter
--
_ _ Peter Steiner <pe...@hugwi.ch>
/ /_/ / Hug-Witschi AG <http://www.hugwi.ch/>
/ _ / Electronic Engineering
/_/ /_/ _ _ Auriedstrasse 10
/ / / / / / CH-3178 Boesingen
/ /_/ /_/ / Tel +41 31 740 44 44
/_ _ _ _ _/ Fax +41 31 740 44 45
Re: static builds and class registration
Posted by Curt Arnold <ca...@apache.org>.
On Dec 12, 2006, at 2:23 AM, Peter Steiner wrote:
> Hello!
>
> Usually I'm using the shared build of log4cxx. But once in while I'm
> testing the static build. The current static build can't find the
> SizeBasedTriggeringPolicy class when using a property configuration.
>
> Should SizeBasedTriggeringPolicy::registerClass() be called from
> Class::registerClasses(), or where should this class be registered?
> Regards, Peter
>
I've added explicit calls to SizeBasedTriggeringPolicy::registerClass
and other RFA related classes to Class::registerClasses() in rev 486481.
The IMPLEMENT_LOG4CXX_OBJECT macro will adds a non-local static
object construction to the implementation file, but since it is non-
local there is no guarantee that it is executed before a
configuration step called from another non-local static constructor.
The Class::registerClasses() was a back up to force class
registration to occur before configuration would fail with a missing
class exception.