add logger support and local env