Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: ObjectPtrT question: msg#00085

apache.logging.log4cxx.user

Subject: Re: ObjectPtrT question


On Dec 21, 2004, at 3:28 PM, Barak Simon wrote:


I am actually using both downcast and "invalid casts" checks (which returns NULL in the cast method) for my log4cxx-derived stuff
(e.g. my DBLogger customised class)
This enables me to detect whether a logger was created as a log4cxx::Logger or by using my DBFactory
(So I can call the correct forcedLog method which, alas, is not a virtual one)
My interim flushAll() method also relies on it for moving on the loggers' hierarchy, but then also using the cast to detect I am on the root logger
(which is of RootCategory class, that is, a sibling of my customised logger); another usage on the same method is for deciding if the current appender is derived from
WriterAppender, and if so, if it is a file or console appender.

But of course I can move to using dynamic_cast instead, if log4cxx moves to using it (and hence, adding the /GR flag on MSVC)


Thanks for the observation. I hadn't committed to anything and I haven't checked whether log4cxx downcasts internally. If it does, then I think that we are stuck with the macro based RTTI to avoid locking out apps that don't like standard C++ RTTI. However, if that facility is only used externally, rarely and by people who know they mucking with log4cxx internals and would use RTTI, then removing it (initially just dummying out the macros) may simplify log4cxx which is generally a good thing. There is much in the pipeline before this becomes an issue and will definitely revisit this on the list before proceeding.




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qplus.devel/200...    network.jabber....    debian.qa-packa...    encryption.gpg....    python.dabo.dev...    uclinux.devel/2...    science.mathema...    recreation.pesc...    kernel.ck/2004-...    mozilla.devel.e...    tex.latex.prosp...    ietf.multi6/200...    bbc.cvs/2002-11...    xfree86.newbie/...    jakarta.taglibs...    altlinux.hardwa...    comedi/2002-05/...    horde.bugs/2004...    games.diplomacy...    finance.e-gold....    web.dom.test-su...    lang.ruby.rails...    os.netbsd.devel...    video.gstreamer...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation