Move RegisterException to api module
Use new class based adapter code
Fix logic error when analyzing logs
Add test for analyzing logs