diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index 0efd06c3..63c99035 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -15,6 +15,7 @@ set(CPPS add_library(linux STATIC ${HEADERS} ${CPPS}) target_link_libraries(linux PRIVATE cfile + plog::plog ) target_include_directories(linux PUBLIC $ -#include +#include +#include #include #if defined(POSIX) @@ -58,7 +58,7 @@ #include "appdatabase.h" #include "linux/lnxdatabase.h" #include "pserror.h" -#include "mono.h" +#include "log.h" #include "pserror.h" #include "registry.h" @@ -103,7 +103,7 @@ oeLnxAppDatabase::~oeLnxAppDatabase() { return; } - mprintf(0, "Can't Export Database Since It's Not There!\n"); + LOG_ERROR << "Can't Export Database Since It's Not There!"; } CRegistry *oeLnxAppDatabase::GetSystemRegistry() { return database; } @@ -118,7 +118,7 @@ bool oeLnxAppDatabase::create_record(const char *pathname) { database->CreateKey((char *)pathname); return true; } - mprintf(0, "Can't CreateKey because database NULL\n"); + LOG_ERROR << "Can't CreateKey because database NULL"; return false; } @@ -128,7 +128,7 @@ bool oeLnxAppDatabase::lookup_record(const char *pathname) { if (database) { return database->LookupKey((char *)pathname); } - mprintf(0, "Can't lookup key because database NULL\n"); + LOG_ERROR << "Can't lookup key because database NULL"; return false; } @@ -138,7 +138,7 @@ bool oeLnxAppDatabase::read(const char *label, char *entry, int *entrylen) { ASSERT(entry); ASSERT(entrylen); if (!database) { - mprintf(0, "Can't read record because database NULL\n"); + LOG_ERROR << "Can't read record because database NULL"; return false; } @@ -159,7 +159,7 @@ bool oeLnxAppDatabase::read(const char *label, void *entry, int wordsize) { ASSERT(label); ASSERT(entry); if (!database) { - mprintf(0, "Can't read record because Database NULL\n"); + LOG_ERROR << "Can't read record because Database NULL"; return false; } @@ -182,7 +182,7 @@ bool oeLnxAppDatabase::read(const char *label, void *entry, int wordsize) { *((uint32_t *)entry) = (uint32_t)data; break; default: - mprintf(0, "Unable to read key %s, unsupported size", label); + LOG_ERROR.printf("Unable to read key %s, unsupported size", label); return false; break; } @@ -203,7 +203,7 @@ bool oeLnxAppDatabase::write(const char *label, const char *entry, int entrylen) ASSERT(label); ASSERT(entry); if (!database) { - mprintf(0, "Can't write record because database NULL\n"); + LOG_ERROR << "Can't write record because database NULL"; return false; } @@ -213,7 +213,7 @@ bool oeLnxAppDatabase::write(const char *label, const char *entry, int entrylen) bool oeLnxAppDatabase::write(const char *label, int entry) { ASSERT(label); if (!database) { - mprintf(0, "Can't write record because database NULL\n"); + LOG_ERROR << "Can't write record because database NULL"; return false; } return database->CreateRecord((char *)label, REGT_DWORD, &entry); diff --git a/linux/registry.cpp b/linux/registry.cpp index 21d345bc..48ab5848 100644 --- a/linux/registry.cpp +++ b/linux/registry.cpp @@ -47,13 +47,13 @@ * $NoKeywords: $ */ -#include -#include -#include -#include -// #include "local_malloc.h" +#include +#include +#include +#include + +#include "log.h" #include "registry.h" -#include "mono.h" #if defined(_WIN32) #define strcasecmp stricmp @@ -244,10 +244,10 @@ bool CRegistry::Import() { char *ptr; file = fopen(name, "rt"); if (!file) { - mprintf(0, "REGISTRY: Unable to import %s\n", name); + LOG_ERROR.printf("REGISTRY: Unable to import %s", name); return false; } - mprintf(0, "REGISTRY: Importing %s\n", name); + LOG_INFO.printf("REGISTRY: Importing %s", name); Destroy(); bool oktocreate;