Ejemplo n.º 1
0
		virtual void log(const std::string& file, int line, LogLevel level, const std::string& msg) {
			LocationInfo loc(file.c_str(), "", line);
			switch(level) {
				case INFO :
					m_logger->info(msg,loc);
					break;
				case DEBUG :
					m_logger->debug(msg,loc);
					break;
				case WARN :
					m_logger->warn(msg,loc);
					break;
				case ERROR :
					m_logger->error(msg,loc);
					break;
			}
		}
PANTHEIOS_CALL(int) pantheios_be_logEntry(
  void*       /* feToken */
, void*       /* beToken */
, int         severity
, char const* entry
, size_t      cchEntry
)
{
  using namespace log4cxx;
  using namespace log4cxx::helpers;

  severity &= 0x07;

  LoggerPtr rootLogger = Logger::getRootLogger();

  switch(severity)
  {
    case  PANTHEIOS_SEV_EMERGENCY:
    case  PANTHEIOS_SEV_ALERT:
      rootLogger->fatal(entry);
      break;
    case  PANTHEIOS_SEV_CRITICAL:
    case  PANTHEIOS_SEV_ERROR:
      rootLogger->error(entry);
      break;
    case  PANTHEIOS_SEV_WARNING:
      rootLogger->warn(entry);
      break;
    case  PANTHEIOS_SEV_NOTICE:
    case  PANTHEIOS_SEV_INFORMATIONAL:
      rootLogger->info(entry);
      break;
    case  PANTHEIOS_SEV_DEBUG:
      rootLogger->debug(entry);
      break;
  }

  return cchEntry;
}
Ejemplo n.º 3
0
void CLog4CXX::Warn(const char *loginfo)
{
    m_logger->warn(loginfo);
}