Skip to content
This repository was archived by the owner on Jul 14, 2021. It is now read-only.
This repository was archived by the owner on Jul 14, 2021. It is now read-only.

Output Message Batching / Buffers #39

@aaldwell

Description

@aaldwell

Enhancement / Feature.
1 line macro to output text to a buffer of a batching system.

Ideally we would have three separate buffers, 1 for errors, 1 for events, and one for everything else, i.e. general debugging. Separating out message types allows us to more easily filer and navigate the output. The batching system would collect all of these and then output them at the end of the frame to wherever we want, based of those filters. This way, all text output can easily be switched to or additionally output to a log file, or any other source we desire on the file without editing any of the individual lines feeding the buffers.

Potential Examples:
//usage
ERROR_TEXT("Graphics failed to initialize! value of window handle: ", pWindow);
DEBUG_TEXT("Just checking to see if the code hits this line.");
EVENT_TEXT("Model loaded: ", m_name);

//directing output
TextBatcher.eventBuffer.outputMode = TextBatcher::eOutputModes::Logfile;
TextBatcher.errorBuffer.outputMode = TextBatcher::eOutputModes::Screen;
TextBatcher.debugBuffer.outputMode = TextBatcher::eOutputModes::Console;

This would replace all std::cout text output currently in the engine and eliminate a building tech debt in this area.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions