/* * $Id: Debug.cpp 97 2008-12-19 15:34:00Z rosiere $ * * [ Description ] * */ #include "Common/include/Debug.h" #include "Common/include/Environment.h" namespace morpheo { #ifdef DEBUG static bool debug_initialized; #endif debug_verbosity_t debug; #undef FUNCTION #define FUNCTION "debug_init" void debug_init (void) { #ifdef DEBUG if (not debug_initialized) { debug = DEBUG; // debug_initialized = true; } #endif } #undef FUNCTION #define FUNCTION "debug_init" void debug_init (debug_verbosity_t level) { #ifdef DEBUG if (not debug_initialized) { // Take min debug = (level < DEBUG)?level:DEBUG; debug_initialized = true; } #endif } }; // end namespace morpheo