Changeset 874 for cpp/common/loggers
- Timestamp:
- 05/05/19 06:21:06 (6 years ago)
- Location:
- cpp/common/loggers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/loggers/loggers.cpp
r873 r874 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-201 5Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2019 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 148 148 { 149 149 if (msgs.length() > 0) msgs += '\n'; 150 msgs += ssprintf(LOG_FORMAT, LOG_LEVEL[level + 1], obj, method, msg);150 msgs += ssprintf(LOG_FORMAT, logLevelName(level), obj, method, msg); 151 151 } 152 152 } … … 170 170 return string(""); 171 171 } 172 -
cpp/common/loggers/loggertostdout.cpp
r522 r874 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-201 5Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2019 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 15 15 16 16 const char** LoggerToStdout::default_log_level[] = 17 { LOG_LEVEL , default_log_level_ansicolor };17 { LOG_LEVEL_ARRAY, default_log_level_ansicolor }; 18 18 19 19 const char* LoggerToStdout::default_log_format[] = //note trailing %s (so it's easy to append "\n" later) … … 29 29 void LoggerToStdout::handleSingleLine(const char *obj, const char *method, int level, const char *msg) 30 30 { 31 if (level < -1) level = -1; else if (level>3) level = 3;32 31 #ifdef SHP 33 AppLog(LOG_FORMAT "\n", LOG_LEVEL[level+1],obj,method,msg);32 AppLog(LOG_FORMAT "\n", logLevelName(level), obj, method, msg); 34 33 #else 35 34 if (file) 36 file->printf(LOG_FORMAT "\n", LOG_LEVEL[level + 1], obj, method, msg);35 file->printf(LOG_FORMAT "\n", logLevelName(level), obj, method, msg); 37 36 else 37 { 38 if (level < -1) level = -1; else if (level > 3) level = 3; 38 39 printf(log_format, log_level[level + 1], obj, method, msg, "\n"); 40 } 39 41 #endif 40 42 }
Note: See TracChangeset
for help on using the changeset viewer.