logger.h
来自「log4cxx 0.10 unix下编译包」· C头文件 代码 · 共 1,634 行 · 第 1/5 页
H
1,634 行
Log a message string with the ERROR level. <p>This method first checks if this logger is <code>ERROR</code> enabled by comparing the level of this logger with the ERROR level. If this logger is <code>ERROR</code> enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag. @param msg the message string to log. @param location location of source of logging request. */ void error(const std::wstring& msg, const log4cxx::spi::LocationInfo& location) const;#endif#if LOG4CXX_UNICHAR_API /** Log a message string with the ERROR level. <p>This method first checks if this logger is <code>ERROR</code> enabled by comparing the level of this logger with the ERROR level. If this logger is <code>ERROR</code> enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag. @param msg the message string to log. @param location location of source of logging request. */ void error(const std::basic_string<UniChar>& msg, const log4cxx::spi::LocationInfo& location) const; /** Log a message string with the ERROR level. <p>This method first checks if this logger is <code>ERROR</code> enabled by comparing the level of this logger with the ERROR level. If this logger is <code>ERROR</code> enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag. @param msg the message string to log. */ void error(const std::basic_string<UniChar>& msg) const;#endif#if LOG4CXX_CFSTRING_API /** Log a message string with the ERROR level. <p>This method first checks if this logger is <code>ERROR</code> enabled by comparing the level of this logger with the ERROR level. If this logger is <code>ERROR</code> enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag. @param msg the message string to log. @param location location of source of logging request. */ void error(const CFStringRef& msg, const log4cxx::spi::LocationInfo& location) const; /** Log a message string with the ERROR level. <p>This method first checks if this logger is <code>ERROR</code> enabled by comparing the level of this logger with the ERROR level. If this logger is <code>ERROR</code> enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag. @param msg the message string to log. */ void error(const CFStringRef& msg) const;#endif /** Log a message string with the FATAL level. <p>This method first checks if this logger is <code>FATAL</code> enabled by comparing the level of this logger with the FATAL level. If this logger is <code>FATAL</code> enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag. @param msg the message string to log. @param location location of source of logging request. */ void fatal(const std::string& msg, const log4cxx::spi::LocationInfo& location) const; /** Log a message string with the ERROR level. <p>This method first checks if this logger is <code>ERROR</code> enabled by comparing the level of this logger with the ERROR level. If this logger is <code>ERROR</code> enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag. @param msg the message string to log. */ void fatal(const std::string& msg) const;#if LOG4CXX_WCHAR_T_API /** Log a message string with the ERROR level. <p>This method first checks if this logger is <code>ERROR</code> enabled by comparing the level of this logger with the ERROR level. If this logger is <code>ERROR</code> enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag. @param msg the message string to log. @param location location of source of logging request. */ void fatal(const std::wstring& msg, const log4cxx::spi::LocationInfo& location) const; /** Log a message string with the ERROR level. <p>This method first checks if this logger is <code>ERROR</code> enabled by comparing the level of this logger with the ERROR level. If this logger is <code>ERROR</code> enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag. @param msg the message string to log. */ void fatal(const std::wstring& msg) const;#endif#if LOG4CXX_UNICHAR_API /** Log a message string with the ERROR level. <p>This method first checks if this logger is <code>ERROR</code> enabled by comparing the level of this logger with the ERROR level. If this logger is <code>ERROR</code> enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag. @param msg the message string to log. @param location location of source of logging request. */ void fatal(const std::basic_string<UniChar>& msg, const log4cxx::spi::LocationInfo& location) const; /** Log a message string with the ERROR level. <p>This method first checks if this logger is <code>ERROR</code> enabled by comparing the level of this logger with the ERROR level. If this logger is <code>ERROR</code> enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag. @param msg the message string to log. */ void fatal(const std::basic_string<UniChar>& msg) const;#endif#if LOG4CXX_CFSTRING_API /** Log a message string with the ERROR level. <p>This method first checks if this logger is <code>ERROR</code> enabled by comparing the level of this logger with the ERROR level. If this logger is <code>ERROR</code> enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag. @param msg the message string to log. @param location location of source of logging request. */ void fatal(const CFStringRef& msg, const log4cxx::spi::LocationInfo& location) const; /** Log a message string with the ERROR level. <p>This method first checks if this logger is <code>ERROR</code> enabled by comparing the level of this logger with the ERROR level. If this logger is <code>ERROR</code> enabled, it proceeds to call all the registered appenders in this logger and also higher in the hierarchy depending on the value of the additivity flag. @param msg the message string to log. */ void fatal(const CFStringRef& msg) const;#endif /** This method creates a new logging event and logs the event without further checks. @param level the level to log. @param message message. @param location location of source of logging request. */ void forcedLog(const LevelPtr& level, const std::string& message, const log4cxx::spi::LocationInfo& location) const; /** This method creates a new logging event and logs the event without further checks. @param level the level to log. @param message message. */ void forcedLog(const LevelPtr& level, const std::string& message) const;#if LOG4CXX_WCHAR_T_API /** This method creates a new logging event and logs the event without further checks. @param level the level to log. @param message message. @param location location of source of logging request. */ void forcedLog(const LevelPtr& level, const std::wstring& message, const log4cxx::spi::LocationInfo& location) const; /** This method creates a new logging event and logs the event without further checks. @param level the level to log. @param message message. */ void forcedLog(const LevelPtr& level, const std::wstring& message) const;#endif#if LOG4CXX_UNICHAR_API || LOG4CXX_CFSTRING_API /** This method creates a new logging event and logs the event without further checks. @param level the level to log. @param message message. @param location location of source of logging request. */ void forcedLog(const LevelPtr& level, const std::basic_string<UniChar>& message, const log4cxx::spi::LocationInfo& location) const; /** This method creates a new logging event and logs the event without further checks. @param level the level to log. @param message message. */ void forcedLog(const LevelPtr& level, const std::basic_string<UniChar>& message) const;#endif#if LOG4CXX_CFSTRING_API /** This method creates a new logging event and logs the event without further checks. @param level the level to log. @param message message. @param location location of source of logging request. */ void forcedLog(const LevelPtr& level, const CFStringRef& message, const log4cxx::spi::LocationInfo& location) const; /** This method creates a new logging event and logs the event without further checks. @param level the level to log. @param message message. */ void forcedLog(const LevelPtr& level, const CFStringRef& message) const;#endif /** This method creates a new logging event and logs the event without further checks. @param level the level to log. @param message the message string to log. @param location location of the logging statement. */ void forcedLogLS(const LevelPtr& level, const LogString& message, const log4cxx::spi::LocationInfo& location) const; /** Get the additivity flag for this Logger instance. */ bool getAdditivity() const; /** Get the appenders contained in this logger as an AppenderList. If no appenders can be found, then an empty AppenderList is returned. @return AppenderList An collection of the appenders in this logger.*/ AppenderList getAllAppenders() const; /** Look for the appender named as <code>name</code>. <p>Return the appender with that name if in the list. Return <code>NULL</code> otherwise. */ AppenderPtr getAppender(const LogString& name) const; /** Starting from this logger, search the logger hierarchy for a non-null level and return it. <p>The Logger class is designed so that this method executes as quickly as possible. @throws RuntimeException if all levels are null in the hierarchy */ virtual const LevelPtr& getEffectiveLevel() const; /** Return the the LoggerRepository where this <code>Logger</code> is attached. */ log4cxx::spi::LoggerRepositoryPtr getLoggerRepository() const; /** * Get the logger name. * @return logger name as LogString. */ const LogString getName() const { return name; } /** * Get logger name in current encoding. * @param name buffer to which name is appended. */ void getName(std::string& name) const;#if LOG4CXX_WCHAR_T_API /** * Get logger name. * @param name buffer to which name is appended. */ void getName(std::wstring& name) const;#endif#if LOG4CXX_UNICHAR_API /** * Get logger name. * @param name buffer to which name is appended. */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?