252 enum Type{kTypeNoLog, kTypeConsole, kTypeFile};
260 enum Level{kDebug, kInfo, kWarning, kError, kFatal};
273 static void setType(
Type type,
const std::string &fileName = kDefaultLogFileName,
bool append =
true);
274 static Type type() {
return type_;}
282 static bool isPrintTime() {
return printTime_;}
289 static bool isPrintLevel() {
return printLevel_;}
296 static bool isPrintEndLine() {
return printEndline_;}
304 static bool isPrintColored() {
return printColored_;}
311 static bool isPrintWhere() {
return printWhere_;}
318 static bool isPrintThreadId() {
return printThreadID_;}
325 static bool isPrintWhereFullPath() {
return printWhereFullPath_;}
338 static bool isBuffered() {
return buffered_;}
367 static void setTreadIdFilter(
const std::vector<std::string> & ids);
368 static const std::set<unsigned long> & getTreadIdFilter() {
return threadIdFilter_;}
375 static void unregisterCurrentThread();
376 static std::map<std::string, unsigned long> getRegisteredThreads();
401 const char *function,
404#if defined(__GNUC__) || defined(__clang__)
413 __attribute__((format(printf, 5, 6)))
467 static std::string logFileName_;
481 static ULogger* createInstance();
491 virtual void _write(
const char*, va_list) {}
492 virtual void _writeStr(
const char*) {}
509 static bool printTime_;
515 static bool printLevel_;
521 static bool printEndline_;
527 static bool printColored_;
533 static bool printWhere_;
541 static bool printWhereFullPath_;
547 static bool printThreadID_;
555 static bool limitWhereLength_;
570 static Level eventLevel_;
572 static const char * levelName_[5];
577 static UMutex loggerMutex_;
583 static bool buffered_;
585 static std::string bufferedMsgs_;
587 static std::set<unsigned long> threadIdFilter_;
588 static std::map<std::string, unsigned long> registeredThreads_;