BWAPI
Public Member Functions
LoggerClass Class Reference

#include <Logger.h>

List of all members.

Public Member Functions

 LoggerClass ()
void log (const std::string &message, int level=0)

Detailed Description

Definition at line 35 of file Logger.h.


Constructor & Destructor Documentation

Definition at line 38 of file Logger.h.

        {
#if _DEBUG
                std::ofstream output("bwapi-data\\Skynet\\SkynetLog.txt", std::ios::trunc);
                output.close();
#endif
        }

Member Function Documentation

void LoggerClass::log ( const std::string &  message,
int  level = 0 
) [inline]

Definition at line 46 of file Logger.h.

References BWAPI::Broodwar, BWAPI::Game::getFrameCount(), BWAPI::Game::printf(), and BWAPI::Game::sendText().

        {
                if(level > 1)
                        BWAPI::Broodwar->sendText(message.c_str());
                else if(level > 0)
                        BWAPI::Broodwar->printf(message.c_str());

#if _DEBUG
                std::ofstream output("bwapi-data\\Skynet\\SkynetLog.txt", std::ios::ate | std::ios::app);
                output << BWAPI::Broodwar->getFrameCount() << " : " << message << std::endl;
                output.close();
#endif
        }

Here is the call graph for this function:


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines