# MI - Fimex: include/fimex/Logger.h File Reference

# include/fimex/Logger.h File Reference

`#include <boost/shared_ptr.hpp>`
`#include <string>`
`#include <sstream>`

Go to the source code of this file.

## Namespaces

namespace | MetNoFimex

## Classes

class | MetNoFimex::Logger

## Defines

#define | LOG4FIMEX(logger, level, message)

## Typedefs

typedef boost::shared_ptr< Logger > | MetNoFimex::LoggerPtr

## Functions

Logger::LogLevel | MetNoFimex::defaultLogLevel ()
void | MetNoFimex::defaultLogLevel (Logger::LogLevel)
LoggerPtr | MetNoFimex::getLogger (const std::string &className)

## Define Documentation

#define LOG4FIMEX | ( | logger,
|  | level,
|  | message |  | ) |

Value:

    { \
        if (logger->isEnabledFor(level)) {\
            std::ostringstream buffer; \
            buffer << message; \
            logger->forcedLog(level, buffer.str(), __FILE__, __LINE__);}}

use this pragma to log a message of a level

Parameters:

  | logger | a logger as retrieved with getLogger("com.bar")
  | level | a fimex LogLevel, i.e. OFF, FATAL, ERROR, WARN, INFO, DEBUG
  | message | the message to log