source: cpp/frams/loggers/loggertostdout.cpp @ 378

Last change on this file since 378 was 378, checked in by Maciej Komosinski, 7 years ago

Improved argument variable names; changed implementation to use STL classes (vector, string)

  • Property svn:eol-style set to native
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
12void 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.