2 * This file is part of the vng project
3 * Copyright (C) 2008 Thomas Zander <tzander@trolltech.com>
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
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, see <http://www.gnu.org/licenses/>.
22 #include <QTextStream>
37 /// return an outputstream logger irregardless of the loglevel
38 static QTextStream
&standardOut();
39 /// return an outputstream or a dummy logger based on verbosity set on the logger and passed as argument.
40 static QTextStream
&log(Verbosity verbosity
);
42 static QTextStream
&debug();
43 /// equals log(Chatty)
44 static QTextStream
&info();
45 /// equals log(Verbose)
46 static QTextStream
&warn();
48 static QTextStream
&error();
51 * by calling this method all the logger operations will be routed via a pager like less (if available).
54 static void startPager();
56 * by calling this method all the logger operations will be routed via a pager like less (if available).
59 static void stopPager();
60 /// return true when there is a pager in use that doesn't support throughput of color information.
61 static bool hasNonColorPager();
62 /// Set the verbosity of the logger. Already in use logger streams will not be affected.
63 static void setVerbosity(Verbosity verbosity
);
64 /// return the verbosity set on the logger.
65 static Verbosity
verbosity();
68 LoggerPrivate
* const d
;