Photon C++ Client API  5.0.7.3
Classes | Namespaces | Macros
Logger.h File Reference

Classes

class  Logger
 

Namespaces

 ExitGames
 
 ExitGames::Common
 

Macros

#define EGLOG(debugLevel, ...)
 

Macro Definition Documentation

◆ EGLOG

#define EGLOG (   debugLevel,
  ... 
)

With debug builds of the Photon client this macro will call debugReturn(), if the passed debug level is of the same or a higher priority than the one returned by getDebugOutputLevel(). In case of a call to debugReturn() it will pass a nicely formatted string consisting of the debug message, a timestamp of the calling time and the filename, function name and line number of the code, from which it has been called. With release builds this macro won't add any code to the resulting binary and therefor not do anything at all.

Remarks
EGLOG() always operates on a variable of type Logger, named mLogger. If no such variable is available in the scope of the call, then calling this macro won't succeed. Until a listener is specified for a logger instance, EGLOG() calls, that operate on that instance, won't log anything. What actually gets printed and to which output device (for example stdout/stderr or a certain file or stream) is up to the implementation of the specified listener.
Parameters
debugLevelthe debug output level of the message, which in combination with the level, which is passed to setDebugOutputLevel() will determine, if the message will be passed to debugReturn() or not
...the debug format string + optional arguments (format specifiers for optional arguments work the same way like in the printf family of functions)
See also
getDebugOutputLevel(), setDebugOutputLevel()