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