OpenANN  1.1.0
An open source library for artificial neural networks.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Public Types | Public Member Functions | Public Attributes | Static Public Attributes
OpenANN::Logger Class Reference

A local logger that can redirect messages to several targets. More...

#include <Logger.h>

Public Types

enum  Target { NONE, CONSOLE, FILE, APPEND_FILE }
 Target of the Logger. More...
 

Public Member Functions

 Logger (Target target, std::string name="Logger")
 
 ~Logger ()
 
bool isActive ()
 Check if the logger redirects to an existing target. More...
 

Public Attributes

enum OpenANN::Logger::Target target
 
std::string name
 
std::ofstream file
 

Static Public Attributes

static bool deactivate
 Deactivate all Logger objects. More...
 

Detailed Description

A local logger that can redirect messages to several targets.

Member Enumeration Documentation

Target of the Logger.

Enumerator
NONE 

Log nothing.

CONSOLE 

Log to stdout.

FILE 

Log to file "name".log.

APPEND_FILE 

Log to file "name"-"time".log.

Constructor & Destructor Documentation

OpenANN::Logger::Logger ( Target  target,
std::string  name = "Logger" 
)
OpenANN::Logger::~Logger ( )

Member Function Documentation

bool OpenANN::Logger::isActive ( )

Check if the logger redirects to an existing target.

Returns
is the logger activated?

Member Data Documentation

bool OpenANN::Logger::deactivate
static

Deactivate all Logger objects.

std::ofstream OpenANN::Logger::file
std::string OpenANN::Logger::name
enum OpenANN::Logger::Target OpenANN::Logger::target

The documentation for this class was generated from the following file: