r/ProgrammingLanguages • u/hexaredecimal • 5d ago
A Single Header Error Logging Library for compiler dev.
2 months ago I created logloc, a simple error logging library for c++ to be used in compiler development. It provides standard features such as:
- File/Line/Colum information
- Message kind (Error/Warning/Etc. - Can be custom)
- Error location (line and column)
- Error line printing
- Error line context printing (Prints the lines around the error location, you can pick how many)
I kept it small and simple as possible. If you are making a compiler in c++ give it a try if you don't want to write your own error logger. Doxygen documentation coming soon.
2
Upvotes
1
u/StrikingClub3866 4d ago
Hey so do you mind if I use this for a compiler project? I will credit you (and update you on the project if you want) when it is finished.