I'm making a console application, and over time I have been developing my own tools and practices for outputting text; a process that keeps evolving.
For example, these days I have 4 main types of messages formatted roughly like the following:
bold( red(" Error: ")) + msg << endl << bold(blue(" Value: ")) + invert(val);
bold( green("Success: ")) + msg << endl << bold(blue(" Value: ")) + invert(val);
bold(orange("Warning: ")) + msg << endl << bold(blue(" Value: ")) + invert(val);
bold(yellow("Process: ")) + msg << endl << bold(blue(" Value: ")) + invert(val);
It makes sense to me, however I am concerned that I might be reinventing the wheel, and would rather follow a standard if one exists, especially if it came from a project like:
- Linux Kernel Development
- Qt Project
- Highly recommended C/C++ manuals or textbooks
- Bjourne's recommendation
- Anything to do with C really.
Do coding standards or best practices for any major projects like this? Are there any others that fall outside this scope but are worth mentioning ?
Thanks.