Expose logging API to modules.
Use logging API and refcount CW API instance properly
Add public logging macros
Only use basename of a module's filename as its name