22 #ifndef STXXL_THREAD_ID
23 # if STXXL_STD_THREADS || STXXL_BOOST_THREADS
24 # define STXXL_THREAD_ID (-1)
26 # define STXXL_THREAD_ID pthread_self()
35 void print_msg(
const char* label,
const std::string& msg,
unsigned flags)
38 #ifdef STXXL_PRINT_TIMESTAMP_ALWAYS
39 const bool timestamp_always =
true;
41 const bool timestamp_always =
false;
46 snprintf(tstr,
sizeof(tstr),
"[%d.%02d:%02d:%02d.%06d] ",
47 int(t / (24 * 60 * 60)),
48 int(t / (60 * 60)) % 24,
49 int(t / 60) % 60,
int(t) % 60,
50 int((t - floor(t)) * 1000000));
67 std::cout << s << std::flush;
69 std::cerr << s << std::flush;
70 logger* logger_instance = logger::get_instance();
72 logger_instance->
log_stream() << s << std::flush;
#define _STXXL_PRNT_ADDNEWLINE
std::ofstream & log_stream()
#define _STXXL_PRNT_TIMESTAMP
#define _STXXL_PRNT_THREAD_ID
double timestamp()
Returns number of seconds since the epoch, high resolution.
#define STXXL_BEGIN_NAMESPACE
void print_msg(const char *label, const std::string &msg, unsigned flags)
std::ofstream & errlog_stream()
#define _STXXL_PRNT_ERRLOG
#define STXXL_END_NAMESPACE
static const double program_start_time_stamp