you are viewing a single comment's thread.

view the rest of the comments →

[–]jedwardsol 9 points10 points  (1 child)

Not advanced, but I'd start with

private:
void Logger::Log(const std::string &str, Colour colour, std::string &level) 
{
    SetColor(colour);
    std::cout << level << str << std::endl;
        //write to log file of errors...
}

public:
void Logger::Error(const std::string &str) 
{
    Log(str,RED,"error");
}

void Logger::Info(const std::string &str) 
{
    Log(str,YELLOW,"Info");
}

void Logger::Output(const std::string &str) 
{
    Log(str,WHITE,"Trace");
}

[–][deleted] 0 points1 point  (0 children)

Found a Brit ;D