lib: extend vty to support logger

add support to logger and some cosmetics.