chore(clang): update example files to follow clang formatting

This commit is contained in:
illyum 2024-09-20 11:08:49 -06:00
parent b939530536
commit 6a579a0512
2 changed files with 27 additions and 17 deletions

View File

@ -7,6 +7,7 @@
#include <src/platform/Platform.hpp> #include <src/platform/Platform.hpp>
void ShowLogger(); void ShowLogger();
void CustomTermHandler(const std::string &message); void CustomTermHandler(const std::string &message);
int main() { int main() {
@ -62,11 +63,16 @@ void ShowLogger() {
// CORE logger is intended for internal engine or core-level logging // CORE logger is intended for internal engine or core-level logging
// In most cases, you won't need to use CORE logging in game/application code, // In most cases, you won't need to use CORE logging in game/application code,
// but it's available for engine-level diagnostics if necessary // but it's available for engine-level diagnostics if necessary
CORE_LOG_TRACE("Initializing {} with age {}", module, age); // Logs a trace-level message, useful for very detailed information CORE_LOG_TRACE("Initializing {} with age {}", module, age);
CORE_LOG_DEBUG("This is an example of a debug message"); // Logs a debug message, typically used for debugging purposes // Logs a trace-level message, useful for very detailed information
CORE_LOG_WARN("This is an example of a warn message"); // Logs a warning, indicating a non-critical issue that should be investigated CORE_LOG_DEBUG("This is an example of a debug message");
CORE_LOG_ERROR("This is an example of an error message"); // Logs an error, signaling that something has gone wrong but the engine can still run // Logs a debug message, typically used for debugging purposes
CORE_LOG_CRITICAL("This is an example of a critical message"); // Logs a critical issue, often indicating a major problem in the core system that needs immediate attention. CORE_LOG_WARN("This is an example of a warn message");
// Logs a warning, indicating a non-critical issue that should be investigated
CORE_LOG_ERROR("This is an example of an error message");
// Logs an error, signaling that something has gone wrong but the engine can still run
CORE_LOG_CRITICAL("This is an example of a critical message");
// Logs a critical issue, often indicating a major problem in the core system that needs immediate attention.
// CORE_LOG_FATAL: Logs a fatal error that crashes the application. Fatal errors in the core usually lead to dumping information into crash logs // CORE_LOG_FATAL: Logs a fatal error that crashes the application. Fatal errors in the core usually lead to dumping information into crash logs
// and stopping the program. Use with extreme caution and only in situations where the application can't recover // and stopping the program. Use with extreme caution and only in situations where the application can't recover
// CORE_LOG_FATAL("This is an example of a fatal message"); // CORE_LOG_FATAL("This is an example of a fatal message");
@ -74,11 +80,16 @@ void ShowLogger() {
// These macros are designed for logging from your game or application code // These macros are designed for logging from your game or application code
// They allow you to monitor application flow, errors, and warnings from the perspective of the game logic or app layer // They allow you to monitor application flow, errors, and warnings from the perspective of the game logic or app layer
LOG_TRACE("App took longer to respond than expected: {} seconds", 2.34); // Logs a trace message, ideal for fine-grained, verbose debugging details LOG_TRACE("App took longer to respond than expected: {} seconds", 2.34);
LOG_DEBUG("This is an example of a debug message"); // Logs a debug message, typically used to help trace the execution during development // Logs a trace message, ideal for fine-grained, verbose debugging details
LOG_WARN("This is an example of a warn message"); // Logs a warning, indicating something unexpected happened, but the application can continue running LOG_DEBUG("This is an example of a debug message");
LOG_ERROR("This is an example of an error message"); // Logs an error, signaling that an issue occurred that may require attention but is not catastrophic // Logs a debug message, typically used to help trace the execution during development
LOG_CRITICAL("This is an example of a critical message"); // Logs a critical message, suggesting something very wrong happened, but the program may still attempt to run LOG_WARN("This is an example of a warn message");
// Logs a warning, indicating something unexpected happened, but the application can continue running
LOG_ERROR("This is an example of an error message");
// Logs an error, signaling that an issue occurred that may require attention but is not catastrophic
LOG_CRITICAL("This is an example of a critical message");
// Logs a critical message, suggesting something very wrong happened, but the program may still attempt to run
// LOG_FATAL: Logs a fatal error in the application layer. This will trigger the Fatal Handler, which you can override // LOG_FATAL: Logs a fatal error in the application layer. This will trigger the Fatal Handler, which you can override
// The Fatal Handler provides a mechanism for handling unrecoverable errors gracefully, allowing you to define how the application reacts to fatal crashes // The Fatal Handler provides a mechanism for handling unrecoverable errors gracefully, allowing you to define how the application reacts to fatal crashes

View File

@ -5,5 +5,4 @@
#include <ICEngine.hpp> #include <ICEngine.hpp>
int main() { int main() {
} }