eclipse / upm

UPM is a high level repository that provides software drivers for a wide variety of commonly used sensors and actuators. These software drivers interact with the underlying hardware platform through calls to MRAA APIs.
MIT License
659 stars 411 forks source link

Logger #650

Closed stefan-andritoiu closed 6 years ago

pylbert commented 6 years ago

I like this implementation - UPM needs a unified logging scheme.

Some formatting ideas below (it would be nice to have an optional classname in there if a method belongs to a class). If we're talking one log file for all binaries built from UPM, then we most likely would need to add either a pid or executable name to differentiate them.

[2018.06.07 10:54:40.638] [WARNING] filename.cxx:10 (ClassName::)function "My error message to log"
[2018.06.07 10:54:40.638] [DEBUG  ] filename.cxx:10 (ClassName::)function "My debug message to log"

If this logging implementation existed in mraa, both projects could benefit. Thoughts?