Go to the documentation of this file.
33 #ifdef ENABLE_ILDG_TAG
39 #ifdef ENABLE_ILDG_TAG
59 if (filename ==
"stdout") {
60 os_ =
new std::ostream(std::cout.rdbuf());
62 os_ =
new std::ofstream(filename.c_str());
66 fprintf(stderr,
"%s: init: unable to open log file \"%s\".\n",
class_name.c_str(), filename.c_str());
81 os_ =
new std::ostream(ost.rdbuf());
84 fprintf(stderr,
"%s: init: unable to open stream.\n",
class_name.c_str());
120 std::ostream *otmp =
stack_.top();
121 if (otmp)
delete otmp;
125 #ifdef ENABLE_ILDG_TAG
137 if ((str ==
"Crucial") || (str ==
"crucial") || (str ==
"CRUCIAL"))
return Bridge::CRUCIAL;
139 if ((str ==
"General") || (str ==
"general") || (str ==
"GENERAL"))
return Bridge::GENERAL;
141 if ((str ==
"Detailed") || (str ==
"detailed") || (str ==
"DETAILED"))
return Bridge::DETAILED;
143 if ((str ==
"Paranoiac") || (str ==
"paranoiac") || (str ==
"PARANOIAC"))
return Bridge::PARANOIAC;
190 va_start(arg, format);
210 va_start(arg, format);
229 va_start(arg, format);
248 va_start(arg, format);
266 va_start(arg, format);
284 va_start(arg, format);
301 va_start(arg, format);
318 va_start(arg, format);
336 va_start(arg, format);
354 va_start(arg, format);
371 va_start(arg, format);
388 va_start(arg, format);
413 int node,
const char *format, va_list& arg)
415 if ((write_level <= level) && (Communicator::nodeid() == node)) {
417 std::cerr <<
"ERROR: BridgeIO: no output stream." << std::endl;
421 vsprintf(
buff_, format, arg);
433 std::cerr <<
"ERROR: BridgeIO: output failed." << std::endl;
440 #ifdef ENABLE_ILDG_TAG
446 ildg_os_ =
new std::ostream(ost.rdbuf());
449 fprintf(stderr,
"%s: init: unable to ildg open stream.\n",
class_name.c_str());
461 if (filename ==
"stdout") {
462 ildg_os_ =
new std::ostream(std::cout.rdbuf());
464 ildg_os_ =
new std::ofstream(filename.c_str());
468 fprintf(stderr,
"%s: init: unable to open ildg log file \"%s\".\n",
class_name.c_str(), filename.c_str());
479 std::cerr <<
"ERROR: BridgeIO: no ildg output stream." << std::endl;
485 va_start(arg, format);
486 vsprintf(
buff_, format, arg);
495 std::cerr <<
"ERROR: BridgeIO: ildg output failed." << std::endl;
void init(const std::string &filename)
std::ostream & getILDGStream()
void detailed(const char *format,...)
std::stack< std::ostream * > stack_
void paranoiac(const char *format,...)
void ildg_init(const std::ostream &os)
static const std::string class_name
void ildg(const char *format,...)
static Bridge::VerboseLevel Vlevel()
static VerboseLevel set_verbose_level(const std::string &str)
BridgeIO(const std::string &filename="stdout")
static int m_indent_level
void crucial(const char *format,...)
static int get_thread_id()
returns thread id.
std::ostream & getStream()
void print(VerboseLevel level, VerboseLevel write_level, int node, const char *format, va_list &arg)
void general(const char *format,...)
static void assert_single_thread(const std::string &class_name)
assert currently running on single thread.
static std::string get_verbose_level(const VerboseLevel vl)