33#include <SoDa/Format.hxx>
41 Debug(std::string _unit_name = std::string(
"UNKNOWN")) {
46 Debug(
const char * _unit_name_cstr) {
51 Debug(
unsigned int _debug_level, std::string _unit_name = std::string(
"UNKNOWN")) {
56 Debug(
unsigned int _debug_level,
const char * _unit_name_cstr) {
61 void debugMsg(
const std::string & msg,
unsigned int threshold = 1) {
64 std::cerr << SoDa::Format(
"%0 %1\t%2\n")
71 void debugMsg(
const SoDa::Format & fmt,
unsigned int threshold = 1) {
75 void debugMsg(
const char * msg,
unsigned int threshold = 1) {
76 debugMsg(std::string(msg), threshold);
std::string unit_name
the name of the unit reporting status
void setDebugLevel(unsigned int v)
Debug(unsigned int _debug_level, const char *_unit_name_cstr)
void debugMsg(const SoDa::Format &fmt, unsigned int threshold=1)
void debugMsg(const char *msg, unsigned int threshold=1)
std::string curDateTime()
static void setDefaultLevel(unsigned int v)
unsigned int debug_level
the debug level (threshold) for messages
Debug(std::string _unit_name=std::string("UNKNOWN"))
static unsigned int global_debug_level
Debug(const char *_unit_name_cstr)
void debugMsg(const std::string &msg, unsigned int threshold=1)
Debug(unsigned int _debug_level, std::string _unit_name=std::string("UNKNOWN"))
static unsigned int getDefaultLevel()
static std::mutex debug_msg_mutex
static void setGlobalLevel(unsigned int v)
static unsigned int getGlobalLevel()
static unsigned int default_debug_level
unsigned int getDebugLevel()