logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kamdar, Devang \(MLITS\)" <Devang_Kam...@ml.com>
Subject Trying to extend LoggingEvent and Logger class
Date Tue, 13 Nov 2007 15:29:18 GMT
Hi,
 
I have derived a class from Logger 
class ABCInternalLogger : public Logger

I am trying to overload a Logger method - forcedLog()

I am creating an event object of type LoggingEvent (parent) pointing to
ABCLogginEvent object.

When I am calling with a constructor of ABCLoggingEvent, I am getting
following error (Visual Studio)

Error 6 error C2665:
'com::ml::mllog4cxx::MLLoggingEvent::MLLoggingEvent' : none of the 4
overloads could convert all the argument types
c:\Working\abcinternallogger.cpp 66 

Below is the declararion in abcloggingevent.h file:

MLLoggingEvent(string fqnOfCategoryClass, MLInternalLogger category,
Priority priority, ObjectPtrT<Object> message, string mess_type, string
sub_lev, string mess_id, string sess_id, string tran_id, string opts[],
Throwable throwable); 

Below is the code that call the ABCLoggingEvent constructor.

void ABCInternalLogger::forcedLog (string fqn, Priority priority,
ObjectPtrT<Object> message, string mess_type, string sub_level, string
message_id, string session_id, string tran_id, string optionals[],
Throwable t) 

{

    LoggingEvent event = ABCLoggingEvent(fqn, this, priority, message,
mess_type, sub_level, message_id, session_id, tran_id, optionals, t);

    callAppenders( event );

}

Can someone help me out here, if I am missign something?

Also in general, If I am extending any of the components in log4cxx,
what is the significance of the MACROS defined in the files like:

DECLARE_LOG4CXX_OBJECT(LoggingEvent)

BEGIN_LOG4CXX_CAST_MAP()

    LOG4CXX_CAST_ENTRY(LoggingEvent)

END_LOG4CXX_CAST_MAP()

Do I need to declare the derived objects in the same fashion.

Your help is greatly appreciated.

 

Thanks

Devang kamdar
--------------------------------------------------------

This message w/attachments (message) may be privileged, confidential or proprietary, and if
you are not an intended recipient, please notify the sender, do not use or share it and delete
it. Unless specifically indicated, this message is not an offer to sell or a solicitation
of any investment products or other financial product or service, an official confirmation
of any transaction, or an official statement of Merrill Lynch. Subject to applicable law,
Merrill Lynch may monitor, review and retain e-communications (EC) traveling through its networks/systems.
The laws of the country of each sender/recipient may impact the handling of EC, and EC may
be archived, supervised and produced in countries other than the country in which you are
located. This message cannot be guaranteed to be secure or error-free. This message is subject
to terms available at the following link: http://www.ml.com/e-communications_terms/. By messaging
with Merrill Lynch you consent to the foregoing.
--------------------------------------------------------

Mime
View raw message