Logging and Error Handling

Add logging and error handling facilities to embedded SDKs.