Ark icon indicating copy to clipboard operation
Ark copied to clipboard

Logs

Open SuperFola opened this issue 3 years ago • 1 comments

The logger was recently removed, because it was meant to handle files and terminal but was never used to output to files (who wants to have an output.log and error.log when using a language?), and it was quite heavy to use for the compiler because it was templated (thus we can't put it in a header and hide the implementation in a source.cpp, it will get copied everywhere and the compiler will spent a lot of time just deducing arguments types and stuff for variadic templates).

Logs format

We will need to discuss a specific format for the logs, for example:

[error code] TYPE message
additionnal context

the error code could be a number, the TYPE either INFO, ERROR, WARNING, and the message would be the error message. The additionnal context would be for syntax / parse / optimizing / compile errors, with the code section where an error was spotted.


We can also consider using spdlog

SuperFola avatar May 12 '21 07:05 SuperFola

Need to consider spdlog + fmtlib

SuperFola avatar Aug 06 '21 13:08 SuperFola