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

Last change on this file since 378 was 378, checked in by Maciej Komosinski, 9 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
RevLine 
[286]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.
[109]4
[375]5#include "loggertostdout.h"
[109]6#ifdef SHP
7#include <FBaseSys.h> //AppLog
8#else
9#include <stdio.h>
10#endif
11
[378]12void LoggerToStdout::handle(const char *obj, const char *method, int level, const char *msg)
[109]13{
[378]14        if (level < -1) level = -1; else if (level>3) level = 3;
[109]15#ifdef SHP
[378]16        AppLog(LOG_FORMAT "\n",LOG_LEVEL[level+1],obj,method,msg);
[109]17#else
[244]18        if (file)
[378]19                file->printf(LOG_FORMAT "\n", LOG_LEVEL[level + 1], obj, method, msg);
[244]20        else
[378]21                printf(LOG_FORMAT "\n", LOG_LEVEL[level + 1], obj, method, msg);
[109]22#endif
23}
Note: See TracBrowser for help on using the repository browser.