12# define snprintf _snprintf
51 if (str_lower ==
"fatal") {
54 if (str_lower ==
"error") {
57 if (str_lower ==
"warning") {
60 if (str_lower ==
"info") {
63 if (str_lower ==
"debug") {
66 if (str_lower ==
"trace") {
87 LOG_ERROR <<
"Unknown log level specified: " << level;
96 printf(
"%s | %s\n", time_str.c_str(), msg);
115 if (strchr(msg,
'\n') ==
nullptr) {
122 for (
const string &line : lines) {
133 os <<
"(" << value.
x <<
", " << value.
y <<
")";
139 os <<
"(" << value.
x <<
", " << value.
y <<
", " << value.
z <<
")";
145 os <<
"(" << value.
x <<
", " << value.
y <<
", " << value.
z <<
", " << value.
w <<
")";
#define CCL_NAMESPACE_END
#define assert(assertion)
void log_init(const LogFunction func)
std::ostream & operator<<(std::ostream &os, const int2 &value)
void _log_message(const LogLevel level, const char *file_line, const char *func, const char *msg)
LogLevel log_string_to_level(const string &str)
static double LOG_START_TIME
static LogFunction LOG_FUNCTION
CCL_NAMESPACE_BEGIN LogLevel LOG_LEVEL
void log_level_set(const LogLevel level)
static void log_default(const LogLevel level, const std::string &time_str, const char *msg)
const char * log_level_to_string(const LogLevel level)
@ LOG_LEVEL_INFO_IMPORTANT
void(*)(const LogLevel level, const char *file_line, const char *func, const char *msg) LogFunction
void string_split(vector< string > &tokens, const string &str, const string &separators, bool skip_empty_tokens)
string string_to_lower(const string &s)
string time_human_readable_from_seconds(const double seconds)
CCL_NAMESPACE_BEGIN double time_dt()