OpenANN  1.1.0
An open source library for artificial neural networks.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Macros | Functions
Logger.h File Reference
#include <string>
#include <iostream>
#include <sstream>
#include <fstream>

Go to the source code of this file.

Classes

struct  OpenANN::FloatingPointFormatter
 Wraps a value and its precision for logging. More...
 
class  OpenANN::Log
 Global logger. More...
 
class  OpenANN::Logger
 A local logger that can redirect messages to several targets. More...
 

Namespaces

 OpenANN
 

Macros

#define OPENANN_OUTPUT(msg)   std::cout << __FILE__ << "(" << __LINE__ << "): " << msg << std::endl;
 
#define OPENANN_TRACE(msg)   std::cerr << __FILE__ << "(" << __LINE__ << "): " << msg << std::endl;
 
#define OPENANN_LOG_NAMESPACE   NULL
 Namespace for global logging. More...
 
#define OPENANN_LOGLEVEL   OpenANN::Log::DEBUG
 Log level for global logging. More...
 
#define OPENANN_LOG(level)
 Log a "level" message. More...
 
#define OPENANN_DEBUG   OPENANN_LOG(OpenANN::Log::DEBUG)
 Log a debug message. More...
 
#define OPENANN_INFO   OPENANN_LOG(OpenANN::Log::INFO)
 Log an info message. More...
 
#define OPENANN_ERROR   OPENANN_LOG(OpenANN::Log::ERROR)
 Log an error message. More...
 

Functions

std::ostream & OpenANN::operator<< (std::ostream &os, const FloatingPointFormatter &t)
 
Logger & OpenANN::operator<< (Logger &logger, const FloatingPointFormatter &t)
 
template<typename T >
Logger & OpenANN::operator<< (Logger &logger, const T &t)
 

Macro Definition Documentation

#define OPENANN_DEBUG   OPENANN_LOG(OpenANN::Log::DEBUG)

Log a debug message.

#define OPENANN_ERROR   OPENANN_LOG(OpenANN::Log::ERROR)

Log an error message.

#define OPENANN_INFO   OPENANN_LOG(OpenANN::Log::INFO)

Log an info message.

#define OPENANN_LOG (   level)
Value:
if(level > OPENANN_LOGLEVEL) ; \
else if(level > OpenANN::Log::getLevel()) ; \

Log a "level" message.

Parameters
levellog level
#define OPENANN_LOG_NAMESPACE   NULL

Namespace for global logging.

#define OPENANN_LOGLEVEL   OpenANN::Log::DEBUG

Log level for global logging.

See Also
OpenANN::Log::LogLevel
#define OPENANN_OUTPUT (   msg)    std::cout << __FILE__ << "(" << __LINE__ << "): " << msg << std::endl;
#define OPENANN_TRACE (   msg)    std::cerr << __FILE__ << "(" << __LINE__ << "): " << msg << std::endl;