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

Last change on this file since 375 was 375, checked in by Maciej Komosinski, 9 years ago

Renamed logging functions to more intuitive and simple names

  • Property svn:eol-style set to native
File size: 606 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
[375]12void LoggerToStdout::handle(const char *o, const char *m, int w, const char *bl)
[109]13{
[244]14        if (w < -1) w = -1; else if (w>3) w = 3;
[109]15#ifdef SHP
[375]16        AppLog(LOG_FORMAT "\n",LOG_LEVEL[w+1],o,m,bl);
[109]17#else
[244]18        if (file)
[375]19                file->printf(LOG_FORMAT "\n", LOG_LEVEL[w + 1], o, m, bl);
[244]20        else
[375]21                printf(LOG_FORMAT "\n", LOG_LEVEL[w + 1], o, m, bl);
[109]22#endif
23}
Note: See TracBrowser for help on using the repository browser.