On May 10, 2005, at 1:06 PM, Kevin Tew wrote:

I'm getting tons of these warnings for every log4cxx class
Any Ideas?

c:\Branches\main\cb\ExternalLibs\include\log4cxx\helpers \appenderattachableimpl.h(106) : warning C4250: 'log4cxx::helpers::AppenderAttachableImpl' : inherits 'log4cxx::helpers::ObjectImpl::log4cxx::helpers::ObjectImpl::addRef' v ia dominance
c:\Branches\main\cb\ExternalLibs\include\log4cxx\helpers \objectimpl.h(32) : see declaration of 'log4cxx::helpers::ObjectImpl::addRef'

Haven't seen these before, will review when I switch from log4j development, to APR, then to log4cxx development on Win32 in the next day or so. What version of Microsoft Visual C++ are you using?

I was also wondering about the state of the rollingfileappender?

I've committed changes to fix some bugs in the log4j 1.3 RFA implementation that needed to be fixed before starting porting. There are still a few things that I want to fix there before bring the code over.


Does log4cxx provided wrapped string conversion routines from const char* variables to log4cxx::LogString?
My log4cxx::LogString is defined as a std::basic_string<wchar_t>



Logging request calls like Logger::debug() etc (which should be invoked using the LOG4CXX_DEBUG, etc macros) take a variety of string types (char*, wchar_t*, std::string, std::wstring) which are only transcoded if the logging event will be dispatched. Other methods that are anticipated to be used frequently may provide three forms, one that returns a LogString, one that takes an std::string and one that takes an std::wstring:


class Foo {
    LogString getName() const;
    void getName(std::string&) const;
    void getName(std::wstring&) const;
};

In a perfect world, unless you are writing an extension appender, layout or similar, you never work with a LogString. However, it is likely that there are some places where std::string and std::wstring methods should be added.

log4cxx/helpers/transcoder.h provides macros to convert from the external string types to the internal string type. However, use of those in client code should be rare.

Reply via email to