EvEmu
0.8.4
11 September 2021
|
a python client stack trace logger for Evemu More...
#include "PyTraceLog.h"
Public Member Functions | |
PyTraceLog (const char *path, bool toConsole=false, bool toFile=false) | |
The constructor of the python stack trace logger. More... | |
~PyTraceLog () | |
the destructor.... nothing special More... | |
bool | logTrace (PyTuple &tuple) |
logTrace is the function what its all about. More... | |
Protected Member Functions | |
void | _logInternStringMessage (PyRep *packet) |
void | _logInternBufferMessage (PyRep *packet) |
void | _logInternBufferPacket (PyRep *packet) |
void | _logInternMessage (const char *str,...) |
intern function for handling logger related messages More... | |
void | _setLogColor (uint32 color) |
Internal function to set the console output color. More... | |
Private Attributes | |
FILE * | mFout |
bool | mInitialized |
bool | mLogToConsole |
bool | mLogToFile |
a python client stack trace logger for Evemu
The PyTraceLog class processes the alert messages into a readable message, because its part of the development system it should be used by non developers.
Definition at line 74 of file PyTraceLog.h.
|
inline |
The constructor of the python stack trace logger.
The constructor of the python stack trace logger.
[in] | path | The path to the file including the file extension (basic for now). |
[in] | toConsole | When want to have the output written to the console pass true. |
[in] | toFile | When want to have the output written to the specified file pass true. |
Definition at line 85 of file PyTraceLog.h.
References mFout, mInitialized, and mLogToConsole.
|
inline |
the destructor.... nothing special
Definition at line 116 of file PyTraceLog.h.
References mFout, and mLogToFile.
|
inlineprotected |
Definition at line 213 of file PyTraceLog.h.
References PyRep::AsBuffer(), PyBuffer::content(), mFout, mLogToConsole, mLogToFile, and PyBuffer::size().
|
inlineprotected |
Definition at line 230 of file PyTraceLog.h.
References PyRep::AsString(), PyString::content(), PyRep::GetType(), mFout, mLogToConsole, mLogToFile, and PyRep::PyTypeString.
Referenced by logTrace().
|
inlineprotected |
intern function for handling logger related messages
intern function for handling logger related messages
[in] | str | the format for the output message. |
Definition at line 271 of file PyTraceLog.h.
References _setLogColor(), mFout, mLogToConsole, mLogToFile, TNORMAL, and TRED.
Referenced by logTrace().
|
inlineprotected |
Definition at line 199 of file PyTraceLog.h.
References PyRep::AsString(), PyString::content(), mFout, mLogToConsole, and mLogToFile.
|
inlineprotected |
Internal function to set the console output color.
Lazy ass function for a developer "toy". We humans like to see some colors.
[in] | color | the color flags / value's for Windows or UNIX, see TRED and the rest on top of this file. |
Definition at line 303 of file PyTraceLog.h.
References colorstrings, and TNORMAL.
Referenced by _logInternMessage().
|
inline |
logTrace is the function what its all about.
the logTrace function processes the packet object into the readable text and prints it to the screen and or the output file.
[in] | tuple | tuple contains the packet info of the trace. |
Definition at line 133 of file PyTraceLog.h.
References _logInternBufferPacket(), _logInternMessage(), PyTuple::GetItem(), PyRep::IsTuple(), mFout, mInitialized, and mLogToFile.
Referenced by AlertService::Handle_SendClientStackTraceAlert().
|
private |
Definition at line 313 of file PyTraceLog.h.
Referenced by _logInternBufferMessage(), _logInternBufferPacket(), _logInternMessage(), _logInternStringMessage(), logTrace(), PyTraceLog(), and ~PyTraceLog().
|
private |
Definition at line 314 of file PyTraceLog.h.
Referenced by logTrace(), and PyTraceLog().
|
private |
Definition at line 315 of file PyTraceLog.h.
Referenced by _logInternBufferMessage(), _logInternBufferPacket(), _logInternMessage(), _logInternStringMessage(), and PyTraceLog().
|
private |
Definition at line 316 of file PyTraceLog.h.
Referenced by _logInternBufferMessage(), _logInternBufferPacket(), _logInternMessage(), _logInternStringMessage(), logTrace(), and ~PyTraceLog().