Open source development of the game Knight Online. This is a reversed engineered old version of the game aiming to replicate the nostalgic experience we all once had <3
This pull request refactors the logging configuration to enhance flexibility and performance across different projects. The changes address the following needs and improvements:
Flexibility Across Projects:
This class is utilized by multiple projects, each with unique requirements.
Some projects do not need spdlog as a dependency, but instead, only require the N3Base engine (e.g., our tools).
To accommodate these varied needs, the implementation is made more configurable through the use of preprocessor directives.
Enhanced Configurability:
By introducing macros, we can control the inclusion of logging code based on project-specific needs.
When logs are disabled in release mode, no logging code will be generated. This optimization helps in improving the performance and reducing the final binary size.
Trade-offs:
While this approach may make the code appear less elegant, the benefits in terms of flexibility and performance outweigh the aesthetic drawbacks.
The ability to manage the logging configuration in this way is crucial for its diverse use-cases.
In summary, these changes ensure that the logging system is more adaptable and efficient, catering to the specific needs of different projects without unnecessary dependencies.
Description
This pull request refactors the logging configuration to enhance flexibility and performance across different projects. The changes address the following needs and improvements:
Flexibility Across Projects:
spdlog
as a dependency, but instead, only require the N3Base engine (e.g., our tools).Enhanced Configurability:
Trade-offs:
In summary, these changes ensure that the logging system is more adaptable and efficient, catering to the specific needs of different projects without unnecessary dependencies.