42 "GGraphics",
"GSound",
"GVideo",
"GEvents",
"GScripts",
43 "GGLAPI",
"GGLWindow",
"GGLShader",
"GGL3rd",
"GGLApp",
"GGLOther",
44 "EGraphics",
"ESound",
"EVideo",
"EEvents",
"ELogic",
"EScripts",
"EActionScript" 48 "Global graphics debug channel",
49 "Global sound debug channel",
50 "Global video (movies) debug channel",
51 "Global events debug channel",
52 "Global scripts debug channel",
53 "OpenGL debug message generated by the GL",
54 "OpenGL debug message generated by the windowing system",
55 "OpenGL debug message generated by the shader compiler",
56 "OpenGL debug message generated by third party middleware",
57 "OpenGL debug message generated by the application",
58 "OpenGL debug message generated by other sources",
59 "Engine graphics debug channel",
60 "Engine sound debug channel",
61 "Engine video debug channel",
62 "Engine events debug channel",
63 "Engine game logic debug channel",
64 "Engine scripts debug channel",
65 "Engine ActionScript debug channel",
69 "Error",
"Deprecated",
"Undefined",
"Portability",
"Performance",
"Other" 121 ChannelMap::iterator c =
_channelMap.find(channel);
136 ChannelMap::const_iterator c =
_channelMap.find(channel);
154 std::vector<UString> debug;
157 for (std::vector<UString>::const_iterator d = debug.begin(); d != debug.end(); ++d) {
158 std::vector<UString> config;
161 if ((config.size() != 2) || config[0].empty())
195 ConfigMan.setString(
"debug", debug,
true);
212 if (
_channels[channel].glTypeIDs[type] ==
id)
258 tstamp =
"[0000-00-00T00:00:00] ";
280 for (std::vector<UString>::const_iterator arg = argv.begin(); arg != argv.end(); ++arg) {
static UString getUserDataDirectory()
Return the OS-specific path of the user data directory.
"GGLAPI", OpenGL debug message generated by the GL.
static const uint32 kMaxVerbosityLevel
A class holding an UTF-8 string.
void writeString(const UString &str)
Write the given string to the stream, encoded as UTF-8.
void logString(const UString &str)
Log that string to the current log file.
The global config manager.
UString composeString(T value)
Convert any POD integer, float/double or bool type into a string.
A date/time object, storing a specific point in time.
uint32 glTypeIDs[kDebugGLTypeMAX]
Information about the last OpenGL message ID for this channel's types.
uint32 getVerbosityLevel(DebugChannel channel) const
Return the verbosity level of this channel (by ID).
bool isEnabled(DebugChannel channel, uint32 level) const
Is this channel ID enabled for this verbosity level?
ChannelMap _channelMap
Debug channels indexed by name.
UString description
The channel's description.
void setConfigToVerbosityLevels()
Sync verbosity levels to the ConfigManager.
static const char *const kDebugDescriptions[kDebugChannelCount]
static const char *const kDebugGLTypes[kDebugGLTypeMAX]
UString formatDateTimeISO(uint32 sep=0, uint32 sepDate=0, uint32 sepTime=0) const
Return a string representation of the date and time in ISO 8601 format.
static UString getDefaultLogFile()
Return the OS-specific default path of the log file.
Utility templates and functions for working with strings and streams.
void logDebugGL(DebugChannel channel, uint32 level, DebugGLType type, uint32 id, const char *msg)
Log (and print) an OpenGL debug message.
Utility functions for manipulating date and time.
The debug manager, managing debug channels.
bool open(const UString &fileName)
Try to open the file with the given fileName.
void closeLogFile()
Close the current log file.
The debug manager, managing debug channels.
#define ConfigMan
Shortcut for accessing the config manager.
Utility templates and functions.
Special value to refer to all debug channel.
static bool isOpenGLDebugChannel(DebugChannel channel)
Basic xoreos version information.
void logCommandLine(const std::vector< UString > &argv)
Write the whole command line to the current log file.
#define DECLARE_SINGLETON(T)
Note that you need to use this macro from the global namespace.
bool isOpen() const
Checks if the object opened a file successfully.
DebugGLType
Types of OpenGL debug messages.
static UString canonicalize(const UString &p, bool resolveSymLinks=true)
Return the canonical, absolutized and normalized path.
bool empty() const
Is the string empty?
void getDebugChannels(std::vector< UString > &names, std::vector< UString > &descriptions) const
Return the channel names alongside their descriptions.
static UString getDirectory(const UString &p)
Return a path's directory.
bool openLogFile(const UString &file)
Open a log file where all debug output will be written to.
void flush()
Commit any buffered data to the underlying channel or storage medium; unbuffered streams can use the ...
Total number of debug channels.
DebugChannel
All debug channels.
void close()
Close the file, if open.
const char * getProjectNameVersionFull()
"GGLOther", OpenGL debug message generated by other sources.
static bool createDirectories(const UString &path)
Create all directories in this path.
uint32 level
The current level at which this debug channel is enabled.
Coordinated Universal Time (UTC).
Types of events that do not fit any of the ones listed above.
void status(const char *s,...)
Channel _channels[kDebugChannelCount]
All debug channels.
void setVerbosityLevelsFromConfig()
Sync verbosity levels from the ConfigManager.
void split(iterator splitPoint, UString &left, UString &right, bool remove=false) const
void setVerbosityLevel(DebugChannel channel, uint32 level)
Set the verbosity level of this channel (by ID).
void parseString(const UString &str, T &value, bool allowEmpty)
Parse a string into any POD integer, float/double or bool type.
Utility class for manipulating file paths.
UString name
The channel's name.
static const char *const kDebugNames[kDebugChannelCount]