Skip to content

Nick #14

Open
wants to merge 17 commits into
base: dev
Choose a base branch
from
8 changes: 1 addition & 7 deletions bfs/CMakeSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,7 @@
"cmakeCommandArgs": "",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"variables": [
{
"name": "CMAKE_INSTALL_PREFIX",
"value": "C:/Users/Greg/Documents/git/bfs/breadcrumbs/install/basic_build",
"type": "PATH"
}
]
"variables": []
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get rid of this change, you should not need to edit this file.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You still need to get rid of this change

}
]
}
51 changes: 0 additions & 51 deletions bfs/include/Logger.h

This file was deleted.

35 changes: 35 additions & 0 deletions bfs/include/Logger.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#ifndef LOGGER_HPP
#define LOGGER_HPP

#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <time.h>
#include <chrono>
#include <ctime>
#include <windows.h>

using namespace std;


Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too much space here, I know it seems kinda picky but there should just be one.


extern class Logger {
public:
string filename;
string filePath;
FILE* fp;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fp, filename, and filepath should all be private

Logger(int l_Level);
~Logger();
void writeLog(const char* fmt, ...);
static Logger* getLogger(Logger* logger);
string getPath();
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these functions can be private I think

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This getPath function should be static

private:
int logging_Level;
//auto now;

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get rid of this space

};

static Logger* logger = logger->getLogger(logger);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get rid of this global, if we need to use the logger in the code, we can just call getLogger(). Instead, add it as a private static pointer in the class initialized to null at first. The first time getLogger is called, this private static variable will be null, so initialize it. Every other call to getLogger (after the first) will just return the pointer and NOT reinitialize it

#endif
Binary file added bfs/scripts/buildbfs.pyc
Binary file not shown.
Loading