Support configure log target

Support configure log target
Fix demo issues