Closed Lomadriel closed 9 years ago
I wait a decision before starting to enhance the Logger. (see #69)
I agree. But it's quite similar to what is already done (the main difference is that, currently, streams are not redirect to std::cerr, which could be a Logger class improvement).
Moreover, and it should have its own issue, some parts can use asserts
and throw
to handle exceptions.
Yes, I agree but we should allow users to choose where they want to write or print MP errors or warnings.
CBenoit said:
(the main difference is that, currently, streams are not redirect to std::cerr, which could be a Logger class improvement).
The new Logger will indeed allow this.
Yes. You can add that here : https://github.com/Mirai-Team/mirai-project/issues/69
With the new logger we can set a default stream in a static variable to log warnings or errors.
This variable is equal by default to std::cout.rdbuf() but users can replace it by what they want.
I think that we have to remove it usage into our Library.
We could use cerr or sf::err. By using this, you can redirect errors on a file or simply display them in stdout stream.