OSDN Git Service

60afa78623411086351b354a9b2518be86cad85d
[dennco/dennco.git] / Source / layer1 / platform / qt / QtTKConsole.cpp
1 //  Copyright (c) 2012 Dennco Project
2 //
3 // This program is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
7 //
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
16 //
17 //  Created by tkawata on 2/27/2012.
18 //
19
20 #include "TKConsole.h"
21
22 #include <QDebug>
23
24 void TKConsole::vprintf(TKLog::MessageType type, const char *fmt, va_list ap)
25 {
26     (void)type;
27     QString msg = QString().vsprintf(fmt,ap);
28     qDebug() << msg << endl;
29 }
30
31 void TKConsole::vDebugPrintf(const char *fmt, va_list ap)
32 {
33 #ifdef DEBUG
34     QString msg = QString().vsprintf(fmt,ap);
35     qDebug() << "DEBUG:" << msg << endl;
36 #endif
37 }