added logging
added logging to rest