add logger api
add logger to window
implement logger