Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to log #434

Merged
merged 9 commits into from
Sep 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Source/Internal/LoggingSystem/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ add_library(ERS_LoggingSystem
# Add Source Files (.cpp)
"ERS_LoggingSystem.cpp"
"ERS_RGBColor.cpp"
"ERS_LogSystemInfo.cpp"

# Add Header Files (.h)
"ERS_LoggingSystem.h"
"ERS_RGBColor.h"
"ERS_LogSystemInfo.h"


${BACKWARD_ENABLE}
Expand All @@ -26,6 +28,9 @@ target_link_libraries(ERS_LoggingSystem

# Link Internal Libs
target_link_libraries(ERS_LoggingSystem
ERS_VersioningSystem
ERS_CompileTimeStamp
ERS_CompilePlatformInfo
)

if (WIN32)
Expand Down
37 changes: 37 additions & 0 deletions Source/Internal/LoggingSystem/ERS_LogSystemInfo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//======================================================================//
// This file is part of the BrainGenix-ERS Environment Rendering System //
//======================================================================//

#include <ERS_LogSystemInfo.h>



void ERS_LogSystemInfo(ERS_LoggingSystem* Logger) {

// Log Logo Text
Logger->Log("Starting BrainGenix-ERS Instance", 2);
Logger->Log("", 5);
Logger->Log("---------------------------------------------------------------------------", 5);
Logger->Log("\x1b[38;2;0;128;55m██████╗ ██████╗ █████╗ ██╗███╗ ██╗\x1b[38;2;130;68;208m ██████╗ ███████╗███╗ ██╗██╗██╗ ██╗", 5);
Logger->Log("\x1b[38;2;0;128;55m██╔══██╗██╔══██╗██╔══██╗██║████╗ ██║\x1b[38;2;130;68;208m██╔════╝ ██╔════╝████╗ ██║██║╚██╗██╔╝", 5);
Logger->Log("\x1b[38;2;0;128;55m██████╔╝██████╔╝███████║██║██╔██╗ ██║\x1b[38;2;130;68;208m██║ ███╗█████╗ ██╔██╗ ██║██║ ╚███╔╝ ", 5);
Logger->Log("\x1b[38;2;0;128;55m██╔══██╗██╔══██╗██╔══██║██║██║╚██╗██║\x1b[38;2;130;68;208m██║ ██║██╔══╝ ██║╚██╗██║██║ ██╔██╗ ", 5);
Logger->Log("\x1b[38;2;0;128;55m██████╔╝██║ ██║██║ ██║██║██║ ╚████║\x1b[38;2;130;68;208m╚██████╔╝███████╗██║ ╚████║██║██╔╝ ██╗", 5);
Logger->Log("\x1b[38;2;0;128;55m╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝\x1b[38;2;130;68;208m ╚═════╝ ╚══════╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝", 5);
Logger->Log("---------------------------------------------------------------------------", 5);
Logger->Log("", 5);
Logger->Log(" +-----------------------------------------------------------------+", 4);
Logger->Log(" | BrainGenix-ERS Real-Time Environment Rendering System |", 4);
Logger->Log(" +-----------------------------------------------------------------+", 4);
Logger->Log("", 4);

Logger->Log(std::string("Version: ") + ERS_VERSION, 4);
Logger->Log(std::string("Compile Date: ") + ERS_COMPILE_TIME_STAMP, 4);
Logger->Log(std::string("Target OS: ") + ERS_TARGET_OS_NAME, 4);
Logger->Log(std::string("Target OS Version: ") + ERS_TARGET_OS_VERSION, 4);
Logger->Log(std::string("Target Processor Architecture: ") + ERS_TARGET_PROCESSOR, 4);
Logger->Log(std::string("Host OS: ") + ERS_HOST_OS_NAME, 4);
Logger->Log(std::string("Host OS Version: ") + ERS_HOST_OS_VERSION, 4);
Logger->Log(std::string("Host Processor Architecture: ") + ERS_HOST_PROCESSOR, 4);

}
24 changes: 24 additions & 0 deletions Source/Internal/LoggingSystem/ERS_LogSystemInfo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//======================================================================//
// This file is part of the BrainGenix-ERS Environment Rendering System //
//======================================================================//

#pragma once

// Standard Libraries (BG convention: use <> instead of "")
#include <memory.h>

// Third-Party Libraries (BG convention: use <> instead of "")

// Internal Libraries (BG convention: use <> instead of "")
#include <ERS_LoggingSystem.h>

#include <ERS_Version.h>
#include <ERS_CompilePlatformInfo.h>
#include <ERS_CompileTimeStamp.h>


/**
* @brief Logs the system information as defined during compilation (version, target os, etc.)
*
*/
void ERS_LogSystemInfo(ERS_LoggingSystem* Logger);
18 changes: 2 additions & 16 deletions Source/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <RendererManager.h>

#include <ERS_LoggingSystem.h>
#include <ERS_LogSystemInfo.h>
#include <ERS_HardwareInformation.h>
#include <ERS_ArgumentParser.h>
#include <ERS_ModelImporter.h>
Expand Down Expand Up @@ -163,22 +164,7 @@ int main(int NumArguments, char** ArguemntValues) {
RendererManager sERSRendererManager(SystemUtils.get(), ProjectUtils.get(), HIDUtils.get());


// Log Logo Text
SystemUtils->Logger_->Log("Starting BrainGenix-ERS Instance", 2);
SystemUtils->Logger_->Log("", 5);
SystemUtils->Logger_->Log("---------------------------------------------------------------------------", 5);
SystemUtils->Logger_->Log("\x1b[38;2;0;128;55m██████╗ ██████╗ █████╗ ██╗███╗ ██╗\x1b[38;2;130;68;208m ██████╗ ███████╗███╗ ██╗██╗██╗ ██╗", 5);
SystemUtils->Logger_->Log("\x1b[38;2;0;128;55m██╔══██╗██╔══██╗██╔══██╗██║████╗ ██║\x1b[38;2;130;68;208m██╔════╝ ██╔════╝████╗ ██║██║╚██╗██╔╝", 5);
SystemUtils->Logger_->Log("\x1b[38;2;0;128;55m██████╔╝██████╔╝███████║██║██╔██╗ ██║\x1b[38;2;130;68;208m██║ ███╗█████╗ ██╔██╗ ██║██║ ╚███╔╝ ", 5);
SystemUtils->Logger_->Log("\x1b[38;2;0;128;55m██╔══██╗██╔══██╗██╔══██║██║██║╚██╗██║\x1b[38;2;130;68;208m██║ ██║██╔══╝ ██║╚██╗██║██║ ██╔██╗ ", 5);
SystemUtils->Logger_->Log("\x1b[38;2;0;128;55m██████╔╝██║ ██║██║ ██║██║██║ ╚████║\x1b[38;2;130;68;208m╚██████╔╝███████╗██║ ╚████║██║██╔╝ ██╗", 5);
SystemUtils->Logger_->Log("\x1b[38;2;0;128;55m╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝\x1b[38;2;130;68;208m ╚═════╝ ╚══════╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝", 5);
SystemUtils->Logger_->Log("---------------------------------------------------------------------------", 5);
SystemUtils->Logger_->Log("", 5);
SystemUtils->Logger_->Log(" +-----------------------------------------------------------------+", 4);
SystemUtils->Logger_->Log(" | BrainGenix-ERS Real-Time Environment Rendering System |", 4);
SystemUtils->Logger_->Log(" +-----------------------------------------------------------------+", 4);
SystemUtils->Logger_->Log("", 4);
ERS_LogSystemInfo(SystemUtils->Logger_.get());


// Initialize Times
Expand Down