NTNU-IHB / FMI4cpp

FMI 2.0 implementation written in modern C++.
MIT License
96 stars 35 forks source link

Improve logging #28

Closed markaren closed 5 years ago

markaren commented 5 years ago

Logging is clumsy and should be improved.

Today it's like this:

#if FMI4CPP_DEBUG_LOGGING_ENABLED
    cout << "Hello world!'" << endl;
#endif

FMI4CPP_DEBUG_LOGGING_ENABLED can be misspelled and the message is only printed in debug mode and cannot be turned off. A logging framework provided more control should probably be used.

There are probably some best practices in the C++ that should be followed?

traversaro commented 5 years ago

I heard good things in the past about https://github.com/gabime/spdlog , but I actually never used it.

markaren commented 5 years ago

@traversaro Will consider it. Thanks!