TrinityCore
|
#include <Log.h>
Public Member Functions | |
Log (const std::string &filename="log.txt", int stripFromStackBottom=0) | |
virtual | ~Log () |
FILE * | getFile () const |
void | section (const std::string &s) |
void __cdecl | printf (const char *fmt,...) G3D_CHECK_PRINTF_METHOD_ARGS |
void __cdecl | vprintf (const char *, va_list argPtr) G3D_CHECK_VPRINTF_METHOD_ARGS |
void __cdecl | lazyvprintf (const char *, va_list argPtr) G3D_CHECK_VPRINTF_METHOD_ARGS |
void | print (const std::string &s) |
void | println (const std::string &s) |
Static Public Member Functions | |
static Log * | common () |
static std::string | getCommonLogFilename () |
Public Attributes | |
int | stripFromStackBottom |
Private Attributes | |
FILE * | logFile |
std::string | filename |
Static Private Attributes | |
static Log * | commonLog = NULL |
System log for debugging purposes. The first log opened is the "common log" and can be accessed with the static method common(). If you access common() and a common log does not yet exist, one is created for you.
Log::Log | ( | const std::string & | filename = "log.txt" , |
int | stripFromStackBottom = 0 |
||
) |
stripFromStackBottom | Number of call stacks to strip from the bottom of the stack when printing a trace. Useful for hiding routines like "main" and "WinMain". If the specified file cannot be opened for some reason, tries to open "c:/tmp/log.txt" or "c:/temp/log.txt" instead. |
|
virtual |
|
static |
|
static |
FILE * Log::getFile | ( | ) | const |
Returns the handle to the file log.
void __cdecl Log::lazyvprintf | ( | const char * | fmt, |
va_list | argPtr | ||
) |
Does not flush
void Log::print | ( | const std::string & | s | ) |
void __cdecl Log::printf | ( | const char * | fmt, |
... | |||
) |
Given arguments like printf, writes characters to the debug text overlay.
void Log::println | ( | const std::string & | s | ) |
void Log::section | ( | const std::string & | s | ) |
Marks the beginning of a logfile section.
void __cdecl Log::vprintf | ( | const char * | fmt, |
va_list | argPtr | ||
) |
|
private |
|
private |
Log messages go here.
int G3D::Log::stripFromStackBottom |