/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #ifndef __TNW_LOGGER_H__ #define __TNW_LOGGER_H__ #include "NwExport.h" #include /** \details Contains definitions of log levels. */ namespace NwLogLevel { /** \details Defines log level value types. */ enum Enum { /**Log all messages.*/ LOG_INFO = 0, /**Log errors, warnings and debug messages.*/ LOG_DEBUG = 1, /**Log errors and warnings.*/ LOG_WARNING = 2, /**Log errors only.*/ LOG_ERROR = 3, /**Log nothing.*/ LOG_NONE = 4 }; } /** \details This class represents the interface for a logger. */ class NWDBEXPORT OdNwLogger { public: /** \details The method called for a logged message. \param level [in] Input NwLogLevel::Enum value with the logging level for this message. \param file [in] The file name to be logged. \param line [in] The line number to be logged. \param message [in] The message to be logged. */ virtual void Log(NwLogLevel::Enum level, const char* file, int line, const OdString& message) const = 0; }; /** \details This template class is a specialization of the std::shared_ptr class for OdNwLogger object pointers. */ typedef std::shared_ptr OdNwLoggerPtr; /** \details This template class is a specialization of the std::weak_ptr class for OdNwLogger object pointers. */ typedef std::weak_ptr OdNwLoggerWeakPtr; #endif // __TNW_LOGGER_H__