source:
cpp/common/loggers/loggertostdout.cpp
@
394
Last change on this file since 394 was 378, checked in by , 10 years ago | |
---|---|
|
|
File size: 670 bytes |
Line | |
---|---|
1 | // This file is a part of Framsticks SDK. http://www.framsticks.com/ |
2 | // Copyright (C) 1999-2015 Maciej Komosinski and Szymon Ulatowski. |
3 | // See LICENSE.txt for details. |
4 | |
5 | #include "loggertostdout.h" |
6 | #ifdef SHP |
7 | #include <FBaseSys.h> //AppLog |
8 | #else |
9 | #include <stdio.h> |
10 | #endif |
11 | |
12 | void LoggerToStdout::handle(const char *obj, const char *method, int level, const char *msg) |
13 | { |
14 | if (level < -1) level = -1; else if (level>3) level = 3; |
15 | #ifdef SHP |
16 | AppLog(LOG_FORMAT "\n",LOG_LEVEL[level+1],obj,method,msg); |
17 | #else |
18 | if (file) |
19 | file->printf(LOG_FORMAT "\n", LOG_LEVEL[level + 1], obj, method, msg); |
20 | else |
21 | printf(LOG_FORMAT "\n", LOG_LEVEL[level + 1], obj, method, msg); |
22 | #endif |
23 | } |
Note: See TracBrowser
for help on using the repository browser.