Support Forum       G3D Web Page     
Public Member Functions | Static Public Member Functions | List of all members
G3D::Log Class Reference


System log for debugging purposes. More...

Public Member Functions

 Log (const String &filename="log.txt")
 
If the specified file cannot be opened for some reason, tries to open "c:/tmp/log.txt" or "c:/temp/log.txt" instead. More...
 
virtual ~Log ()
 
FILE * getFile () const
 
Returns the handle to the file log. More...
 
void lazyvprintf (const char *, va_list argPtr)
 Does not flush. More...
 
void print (const String &s)
 
void printf (const char *fmt,...)
 
Given arguments like printf, writes characters to the debug text overlay. More...
 
void println (const String &s)
 
void section (const String &s)
 
Marks the beginning of a logfile section. More...
 
void vprintf (const char *, va_list argPtr)
 

Static Public Member Functions

static Logcommon ()
 
static Logcommon (const String &filename)
 Creates the common log with the specified filename. More...
 
static String getCommonLogFilename ()
 

Detailed Description


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.

Constructor & Destructor Documentation

◆ Log()

G3D::Log::Log ( const String filename = "log.txt")


If the specified file cannot be opened for some reason, tries to open "c:/tmp/log.txt" or "c:/temp/log.txt" instead.

◆ ~Log()

virtual G3D::Log::~Log ( )
virtual

Member Function Documentation

◆ common() [1/2]

static Log* G3D::Log::common ( )
static

◆ common() [2/2]

static Log* G3D::Log::common ( const String filename)
static

Creates the common log with the specified filename.

◆ getCommonLogFilename()

static String G3D::Log::getCommonLogFilename ( )
static

◆ getFile()

FILE* G3D::Log::getFile ( ) const


Returns the handle to the file log.

◆ lazyvprintf()

void G3D::Log::lazyvprintf ( const char *  ,
va_list  argPtr 
)

Does not flush.

◆ print()

void G3D::Log::print ( const String s)

◆ printf()

void G3D::Log::printf ( const char *  fmt,
  ... 
)


Given arguments like printf, writes characters to the debug text overlay.

◆ println()

void G3D::Log::println ( const String s)

◆ section()

void G3D::Log::section ( const String s)


Marks the beginning of a logfile section.

◆ vprintf()

void G3D::Log::vprintf ( const char *  ,
va_list  argPtr 
)

documentation generated on Wed Nov 24 2021 08:01:57 using doxygen 1.8.15