Rantanen / intercom

Object based cross-language FFI for Rust
MIT License
63 stars 7 forks source link

Add debug logging #134

Closed Rantanen closed 4 years ago

Rantanen commented 4 years ago

We should add some sort of debug log trace thing into our generated methods. These methods are impossible to step through with a debugger so having debug messages to tell what's happening would be helpful.

This should probably be done by Intercom re-exporting log() from the log crate and the macros using that. This way the macros can depend on that item being always present and we can provide an empty shim if Intercom is not built with a log feature.

Enabling the logging would be left for the user crate, which needs to set it up by initializing something like the env_logger.