diff --git a/main.cpp b/main.cpp index 55d2874..cb57428 100644 --- a/main.cpp +++ b/main.cpp @@ -9,7 +9,14 @@ namespace gz::vk { int mainLoop() { - Log log("", true, false, "Main", Color::BG_RED); + LogCreateInfo logCI{}; + logCI.logfile = "main.log"; + logCI.storeLog = false; + logCI.prefix = "Main"; + logCI.prefixColor = Color::BG_RED; + logCI.timeColor = VULKAN_MESSAGE_TIME_COLOR; + Log log(std::move(logCI)); + gz::SettingsManagerCreateInfo smCI{}; smCI.filepath = gz::vk::CONFIG_FILE; smCI.readFileOnCreation = true; diff --git a/renderer2D.cpp b/renderer2D.cpp index 1e2250f..667d0fc 100644 --- a/renderer2D.cpp +++ b/renderer2D.cpp @@ -16,9 +16,16 @@ namespace gz::vk { // INIT & CLEANUP // Renderer2D::Renderer2D(VulkanInstance& instance, TextureManager& textureManager) : - Renderer(instance, textureManager), - rLog("renderer2D.log", true, false, "2D-Renderer", Color::LI_MAGENTA, VULKAN_MESSAGE_TIME_COLOR, true, 100) + Renderer(instance, textureManager) { + LogCreateInfo logCI{}; + logCI.logfile = "renderer2D.log"; + logCI.storeLog = false; + logCI.prefix = "2D-Renderer"; + logCI.prefixColor = Color::LI_MAGENTA; + logCI.timeColor = VULKAN_MESSAGE_TIME_COLOR; + rLog = Log(std::move(logCI)); + vk.registerCleanupCallback(std::bind(&Renderer2D::cleanup, this)); vk.registerSwapChainRecreateCallback(std::bind(&Renderer2D::swapChainRecreateCallback, this)); vk.createCommandBuffers(commandBuffers); diff --git a/renderer3D.cpp b/renderer3D.cpp index 03d9de7..c114b44 100644 --- a/renderer3D.cpp +++ b/renderer3D.cpp @@ -12,8 +12,14 @@ namespace gz::vk { // INIT & CLEANUP // Renderer3D::Renderer3D(VulkanInstance& instance, TextureManager& textureManager) : - Renderer(instance, textureManager), - rLog("renderer3D.log", true, false, "3D-Renderer", Color::CYAN, VULKAN_MESSAGE_TIME_COLOR, true, 100) { + Renderer(instance, textureManager) { + LogCreateInfo logCI{}; + logCI.logfile = "renderer3D.log"; + logCI.storeLog = false; + logCI.prefix = "3D-Renderer"; + logCI.prefixColor = Color::LI_CYAN; + logCI.timeColor = VULKAN_MESSAGE_TIME_COLOR; + rLog = Log(std::move(logCI)); vk.registerCleanupCallback(std::bind(&Renderer3D::cleanup, this)); vk.registerSwapChainRecreateCallback(std::bind(&Renderer3D::swapChainRecreateCallback, this)); diff --git a/vulkan_instance.cpp b/vulkan_instance.cpp index 57bd473..6ed68f2 100644 --- a/vulkan_instance.cpp +++ b/vulkan_instance.cpp @@ -285,7 +285,7 @@ void VulkanInstance::getHandleOwnerString(std::string_view message) { } } -gz::Log VulkanInstance::vLog("vulkan.log", true, true, "Vulkan", VULKAN_MESSAGE_PREFIX_COLOR, VULKAN_MESSAGE_TIME_COLOR); +gz::Log VulkanInstance::vLog("vulkan.log", true, true, "Vulkan", VULKAN_MESSAGE_PREFIX_COLOR, true, VULKAN_MESSAGE_TIME_COLOR); VKAPI_ATTR VkBool32 VKAPI_CALL VulkanInstance::debugLog( VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverety, VkDebugUtilsMessageTypeFlagsEXT messageType,