minamijoyo / tfschema

A schema inspector for Terraform / OpenTofu providers
MIT License
295 stars 15 forks source link

Added NewClient option to override logger #26

Closed shlomimatichin closed 4 years ago

shlomimatichin commented 4 years ago

github.com/env0/terratag is using tfschema not as a subprocess, but by calling public API. currently, public API creates hcl.Logger with output set directly to os.Stderr with log level being TRACE. this means terratag output always contains a lot of debug info, less relevant for terratag users. we wanted to be able to control the logger, both output and log level, so we added that as an option to NewClient public function.