In a previous programming job, we had a very useful debug print system that would allow you to put debug print at levels DEBUG, INFO, WARN, ERROR. You could then at run time change your logging level to control how much information was logged, so for example if you chose INFO level, it would do the last 3 but not the DEBUG logging.
Additionally, this system would look at the file names (it was C++, though I am using Blueprints right now) using _FILE_ and _LINE_ macros, so you could filter it down based essentially on component and even line number.
I would like to do a slightly more limited version of this that includes the level, but also the blueprint class that is currently asking to do the print. I need help with the design, but I’m happy to read up on whatever is necessary.
Thought 1:
I could create a blueprint macro library and implement everything there. Open questions is can I store a variable in the macro library to keep track of the current level? I also need to figure out if you can / how to create a macro item so that you can have multiple pins to combine the string concat and the print in one blueprint macro.
Thought 2:
If I can’t have globals in the macro library, I could add attach them to the game mode. I could either put them in the game mode as is, or create a new blueprint class derived from game mode and add them to that, and then any project where I want to use these debug macros I would need to have a game mode based on this new class, but fortunately you can rebase your classes.
Unfortunately it appears you can’t create a Get Game Mode blueprint function in a macro in a macro library.
Recommendations?