Angel 3.2
A 2D Game Prototyping Engine
Public Member Functions | Static Public Member Functions | List of all members
FileLog Class Reference

A log which writes to a file on disk. More...

#include <Log.h>

+ Inheritance diagram for FileLog:

Public Member Functions

 FileLog (const String &fileName)
 
virtual void Log (const String &val)
 
- Public Member Functions inherited from DeveloperLog
virtual ~DeveloperLog ()
 
void Printf (const char *format,...)
 

Static Public Member Functions

static String MakeLogFileName (const String &fileName)
 

Detailed Description

This type of Log appends its text to a specified file in the Logs directory.

Definition at line 88 of file Log.h.

Constructor & Destructor Documentation

FileLog::FileLog ( const String &  fileName)

The constructor takes a filename (which can be generated from FileLog::MakeLogFileName). NB: If the file already exists, it will be cleared. The file will get a timestamp at the top saying when it was first opened.

Parameters
fileName

Definition at line 128 of file Log.cpp.

Member Function Documentation

String FileLog::MakeLogFileName ( const String &  fileName)
static

Gives the relative path to the log file from a desired name.

Parameters
fileNameThe desired name (for example: "StartupLog")
Returns
The path to the file (for example: "Logs/StartupLog.log"). This path is relative to the executable.

Definition at line 113 of file Log.cpp.

void FileLog::Log ( const String &  val)
virtual

The string to be logged in the file.

Parameters
valThe string to put in the file

Implements DeveloperLog.

Definition at line 140 of file Log.cpp.


The documentation for this class was generated from the following files: