void log(const char* msg, int level = LOGNOTICE);