Use shared SVG renderers.
[sloppygui.git] / src / stdoutlogger.h
blob6baaaf739a0e9c20dd9890f4f07300a7e5d1a688
1 /*
2 This file is part of SloppyGUI.
4 SloppyGUI is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 SloppyGUI is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with SloppyGUI. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef STDOUTLOGGER_H
19 #define STDOUTLOGGER_H
21 #include "loggerbase.h"
23 /**
24 * StdOutLogger class provides logging output to standard output and
25 * standard error.
27 * StdOutLogger is the default logger of LogManager, you don't
28 * need to add it separately.
30 * You should not use this class directly but use Qt's own debug functions
31 * qDebug(), qWarning(), qCritical() and qFatal() to do the logging. See
32 * Qt's documentation how to use these functions.
34 * Depending on the message's type the message is printed to different
35 * output steam. Debug messages are printed to standard output and all
36 * other types (warnings, critical message and fatal messages) are
37 * printed to standard error.
39 class StdOutLogger : public LoggerBase
41 public:
42 /**
43 * Prints a new log message to standard output / error.
44 * The message's type defines the output steam. Only debug
45 * messages are printed to standard output, all other
46 * messages are printed to standard error.
47 * @param type Message's type.
48 * @param message The message.
50 void log(QtMsgType type, const char *message);
53 #endif // STDOUTLOGGER_H