[Add] logger

- [x] logger cli vs api 
- [x] replace writeln by logger