1 // Copyright (C) 2002-2012 Nikolaus Gebhardt
\r
2 // This file is part of the "Irrlicht Engine".
\r
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
\r
5 #ifndef __I_LOGGER_H_INCLUDED__
\r
6 #define __I_LOGGER_H_INCLUDED__
\r
8 #include "IReferenceCounted.h"
\r
13 //! Possible log levels.
\r
14 //! When used has filter ELL_DEBUG means => log everything and ELL_NONE means => log (nearly) nothing.
\r
15 //! When used to print logging information ELL_DEBUG will have lowest priority while ELL_NONE
\r
16 //! messages are never filtered and always printed.
\r
19 //! Used for printing information helpful in debugging
\r
22 //! Useful information to print. For example hardware infos or something started/stopped.
\r
25 //! Warnings that something isn't as expected and can cause oddities
\r
28 //! Something did go wrong.
\r
31 //! Logs with ELL_NONE will never be filtered.
\r
32 //! And used as filter it will remove all logging except ELL_NONE messages.
\r
37 //! Interface for logging messages, warnings and errors
\r
38 class ILogger : public virtual IReferenceCounted
\r
43 virtual ~ILogger() {}
\r
45 //! Returns the current set log level.
\r
46 virtual ELOG_LEVEL getLogLevel() const = 0;
\r
48 //! Sets a new log level.
\r
49 /** With this value, texts which are sent to the logger are filtered
\r
50 out. For example setting this value to ELL_WARNING, only warnings and
\r
51 errors are printed out. Setting it to ELL_INFORMATION, which is the
\r
52 default setting, warnings, errors and informational texts are printed
\r
54 \param ll: new log level filter value. */
\r
55 virtual void setLogLevel(ELOG_LEVEL ll) = 0;
\r
57 //! Prints out a text into the log
\r
58 /** \param text: Text to print out.
\r
59 \param ll: Log level of the text. If the text is an error, set
\r
60 it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it
\r
61 is just an informational text, set it to ELL_INFORMATION. Texts are
\r
62 filtered with these levels. If you want to be a text displayed,
\r
63 independent on what level filter is set, use ELL_NONE. */
\r
64 virtual void log(const c8* text, ELOG_LEVEL ll=ELL_INFORMATION) = 0;
\r
66 //! Prints out a text into the log
\r
67 /** \param text: Text to print out.
\r
68 \param hint: Additional info. This string is added after a " :" to the
\r
70 \param ll: Log level of the text. If the text is an error, set
\r
71 it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it
\r
72 is just an informational text, set it to ELL_INFORMATION. Texts are
\r
73 filtered with these levels. If you want to be a text displayed,
\r
74 independent on what level filter is set, use ELL_NONE. */
\r
75 virtual void log(const c8* text, const c8* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0;
\r
76 virtual void log(const c8* text, const wchar_t* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0;
\r
78 //! Prints out a text into the log
\r
79 /** \param text: Text to print out.
\r
80 \param hint: Additional info. This string is added after a " :" to the
\r
82 \param ll: Log level of the text. If the text is an error, set
\r
83 it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it
\r
84 is just an informational text, set it to ELL_INFORMATION. Texts are
\r
85 filtered with these levels. If you want to be a text displayed,
\r
86 independent on what level filter is set, use ELL_NONE. */
\r
87 virtual void log(const wchar_t* text, const wchar_t* hint, ELOG_LEVEL ll=ELL_INFORMATION) = 0;
\r
89 //! Prints out a text into the log
\r
90 /** \param text: Text to print out.
\r
91 \param ll: Log level of the text. If the text is an error, set
\r
92 it to ELL_ERROR, if it is warning set it to ELL_WARNING, and if it
\r
93 is just an informational text, set it to ELL_INFORMATION. Texts are
\r
94 filtered with these levels. If you want to be a text displayed,
\r
95 independent on what level filter is set, use ELL_NONE. */
\r
96 virtual void log(const wchar_t* text, ELOG_LEVEL ll=ELL_INFORMATION) = 0;
\r