#ifndef ZMEXVIAERRLOG_H #define ZMEXVIAERRLOG_H // ---------------------------------------------------------------------- // // ZMexViaErrlog.h - provide basic logging behavior to an ErrorLog // // History: // 05-Jan-1999 WEB Initial draft. // // ---------------------------------------------------------------------- #ifndef ZMENVIRONMENT_H #include "ZMutility/ZMenvironment.h" #endif #ifndef ZMEXLOGGER_H #include "Exceptions/ZMexLogger.h" #endif #ifndef ZMEXLOGRESULT_H #include "Exceptions/ZMexLogResult.h" #endif #ifndef ZMXEL_H #include "ErrLogEx/ZMxel.h" #endif // ---------------------------------------------------------------------- ZM_BEGIN_NAMESPACE( zmex ) /* namespace zmex { */ // ---------------------------------------------------------------------- class ErrorLog; // ---------------------------------------------------------------------- // ------------ // ZMexViaErrlog // ------------ class ZMexViaErrlog : public ZMexLogBehavior { public: ZMexViaErrlog( ErrorLog & log ); // Construct this behavior virtual ~ZMexViaErrlog(); // Destroy this behavior virtual ZM_COVARIANT_TYPE(ZMexLogBehavior,ZMexViaErrlog) * clone() const; // Duplicate this logger object virtual ZMexLogResult emit( const ZMexception & x ); // Carry out this logger's basic logging behavior: log to an ErrorLog virtual ZMexLogResult emit( const std::string & s ); // Should not be called! private: ErrorLog & myLog; // Keep track of desired logger sink }; // ZMexLogBehavior // ---------------------------------------------------------------------- ZM_END_NAMESPACE( zmex ) /* } // namespace zmex */ // ---------------------------------------------------------------------- #endif // ZMEXVIAERRLOG_H