You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the time of writing of this issue. Engine3D's logger is only able to be used to supply a spdlog::format_string and writing to the console. It works but we may want to look into how loggers may be defined in Engine3D more carefully.
One of the things that I thought about is what if developers wanted to send logs messages to specifics UI's or if they have multiple terminal consoles and how would this be supplied.
Intention
Disclaimer - This is still able to be changed in the future if this feature's not needed. The API is a quick code snippet of how I may see this newly feature be used.
The intention is having a few types of loggers that can be customized to users. Few types being one for writing to console and one writing to the UI.
Console Loggers are logger messages that can be written to either console terminal or redirecting logging messages to a specific terminal if needed.
Engine Loggers are loggers that can redirect loggers within a UI, Widget, or internal structure of the engine. Which can supply an object to that UI, Panel, Layer, or application redirecting logging messages to the supplied pointer to those objects.
API Idea
Here are how I am considering having an API look for the console and engine-defined logger.
// We'd probably have some abstraction called engine3d::ConsoleEngineLoggerConsoleLogTrace(console, fmt, args...)
// usage//! @param console is if users want to define where their loggers write to which console.
ConsoleLogTrace(&console, "There was an error that occured at location {}", dt);
Engine-defined logger
Engine-defined loggers can also be used to redirect log messages to specific UI's or other portions of the engine that may be seen fit to the user.
//! @note We'd have a class probably on a separate thread that would handle engine-level loggers// this loggers intentional use in the UI Editor.// engine3d::EngineLogger// Disclaimer - at the time of writing this issue the name is the same as the logger that already exists, because I cant think of a different name at the time of writing this issue.// API Example EngineLogTrace(engine_t, fmt, args...);
EngineLog*(widget/ui/panels, fmt, args...);
// API UsageEngineLogInfo(&panel[0], "This panel accepts this log and number is {}", 0);
The text was updated successfully, but these errors were encountered:
Overview
As the time of writing of this issue. Engine3D's logger is only able to be used to supply a spdlog::format_string and writing to the console. It works but we may want to look into how loggers may be defined in Engine3D more carefully.
One of the things that I thought about is what if developers wanted to send logs messages to specifics UI's or if they have multiple terminal consoles and how would this be supplied.
Intention
Disclaimer - This is still able to be changed in the future if this feature's not needed. The API is a quick code snippet of how I may see this newly feature be used.
The intention is having a few types of loggers that can be customized to users. Few types being one for writing to console and one writing to the UI.
Console Loggers are logger messages that can be written to either console terminal or redirecting logging messages to a specific terminal if needed.
Engine Loggers are loggers that can redirect loggers within a UI, Widget, or internal structure of the engine. Which can supply an object to that UI, Panel, Layer, or application redirecting logging messages to the supplied pointer to those objects.
API Idea
Here are how I am considering having an API look for the console and engine-defined logger.
Engine-defined logger
The text was updated successfully, but these errors were encountered: