Add the logging framework to the parrot.

This commit is contained in:
Jonathan Naylor
2016-10-04 17:54:58 +01:00
parent ab4cb939c5
commit 4485475a82
14 changed files with 255 additions and 50 deletions
+3 -2
View File
@@ -12,6 +12,7 @@
*/
#include "Utils.h"
#include "Log.h"
#include <cstdio>
#include <cassert>
@@ -27,7 +28,7 @@ void CUtils::dump(int level, const std::string& title, const unsigned char* data
{
assert(data != NULL);
::fprintf(stdout, "%s\n", title.c_str());
::Log(level, "%s", title.c_str());
unsigned int offset = 0U;
@@ -58,7 +59,7 @@ void CUtils::dump(int level, const std::string& title, const unsigned char* data
output += '*';
::fprintf(stdout, "%04X: %s\n", offset, output.c_str());
::Log(level, "%04X: %s", offset, output.c_str());
offset += 16U;