Logo SoCRocket

Transaction-Level Modeling Framework for Space Applications

Classes | Namespaces | Macros | Functions | Variables
verbose.h File Reference

Implements a unified output system for messages and debunging. More...

#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <streambuf>
#include "core/common/common.h"
#include "core/common/systemc.h"
Include dependency graph for verbose.h:
This graph shows which files directly or indirectly include this file:

Classes

class  v::Color
 Output colors. More...
 
class  v::Number
 Output colors. More...
 
class  v::msgstream< level >
 
class  v::logstream< level >
 

Namespaces

 v
 

Macros

#define VERBOSITY   4
 

Functions

std::ostream & v::operator<< (std::ostream &os, const Color &cl)
 Display the color code on the std::ostream. More...
 
std::ostream & v::operator<< (std::ostream &os, const Number &n)
 Display the color code on the std::ostream. More...
 
void v::logFile (const char *name)
 
void v::logApplication (const char *name)
 

Variables

logstream< 0 > v::error
 
logstream< 1 > v::warn
 
logstream< 2 > v::report
 
logstream< 3 > v::info
 
logstream< 4 > v::analysis
 
logstream< 5 > v::debug
 
logstream< 99 > v::null_log
 

Detailed Description

Implements a unified output system for messages and debunging.

The operators defined in verbose.h can be used to filter output messages respecting their severity. As explained in Bulding the Library the verbosity level of the simulations must be defined during configuration of the library:

$ ./waf configure –verbosity=1..5

Five levels may be chosen: error, warning, report, info and debug.

The operators are used in a similar way to C++ stdout:

std::cout << value << std::endl; // Regular C++ stdout
v::error << value << v::endl; // Verbosity error stream
v::warn << value << v::endl; // Verbosity warn stream
v::report << value << v::endl; // Verbosity report stream
v::info << value << v::endl; // Verbosity info stream
v::debug << value << v::endl; // Verbosity debug stream

Defining the verbosity at configuration time has the advantage that undesired output is optimized way (compared to runtime switching).

Date
2010-2015
Author
Rolf Meyer

Macro Definition Documentation

#define VERBOSITY   4

Standard verbosity is 3. All messages but debug.

Referenced by v::logstream< level >::operator bool(), v::msgstream< level >::operator<<(), and v::logstream< level >::operator<<().