2
** Copyright 2004-2009 - INL
3
** Written by Pierre Chifflier <chifflier@inl.fr>
4
** INL http://www.inl.fr/
6
** This program is free software; you can redistribute it and/or modify
7
** it under the terms of the GNU General Public License as published by
8
** the Free Software Foundation, version 2 of the License.
10
** This program is distributed in the hope that it will be useful,
11
** but WITHOUT ANY WARRANTY; without even the implied warranty of
12
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
** GNU General Public License for more details.
15
** You should have received a copy of the GNU General Public License
16
** along with this program; if not, write to the Free Software
17
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28
extern int debug_level;
31
NuLogsWindow::NuLogsWindow(QWidget *parent)
33
ui = new Ui::LogsWindow();
37
void NuLogsWindow::addLine(int area, int level, char *format, va_list args)
40
QDateTime date = QDateTime::currentDateTime();
41
const char *dateformat = "yyyy-MM-dd hh:mm:ss.zzz";
43
msg.vsprintf(format, args);
44
text = QString("[%1] %2").arg(date.toString(dateformat)).arg(msg);
45
ui->edit->append( text );
46
ui->edit->textCursor().movePosition(QTextCursor::End);
47
ui->edit->ensureCursorVisible();
50
void NuLogsWindow(int level)