From: Konstantin L. <to....@gm...> - 2009-10-26 17:09:32
|
On 26.10.2009 15:43, S Roderick wrote: [.........huge skip.........] Roderick, I understand all your wishes and can propose followed solution: 1. We add ability to set up creator for categories in HierarchyMaintainer 2. You write you own RTCategory that derived from log4cpp Category and meet all your requirements - you hide from usage all functions that receive std::strings and expose those that receive rt_strings. 3. To use log4cpp in usual manner user should setup default creator as RTCategory creator and do following when obtaining reference on RTCategory: class foo { public: foo() : logger_(static_cast<RTCategory&>(log4cpp::Category::getInstance("foo"))) { } private: RTCategory& logger_; }; Please, comment this. As for rt allocator in HierarchyMaintainer that is really hard and likely impossible, because I don't know how to rewrite HierarchyMaintainer::_getInstance in a way that it become rt. It uses std::string and I see no way how to avoid std::string creation... |