malli icon indicating copy to clipboard operation
malli copied to clipboard

suppress println or log/debug when instrumenting?

Open csummers opened this issue 2 years ago • 2 comments

Is there any chance the following lines could be optionally suppressed or be changed to log/debug? When using malli.dev/start! on a large codebase, these create a lot of print statements to stdout/repl.

https://github.com/metosin/malli/blob/3599fbd7fe1eba96c35e5c39073397cba0984b6a/src/malli/instrument.clj#L27

https://github.com/metosin/malli/blob/3599fbd7fe1eba96c35e5c39073397cba0984b6a/src/malli/instrument.clj#L31

Thanks!

csummers avatar Apr 09 '22 12:04 csummers

there is no logging library used, but PR welcome to add an option that disables the printing.

ikitommi avatar Apr 13 '22 13:04 ikitommi

I also am getting a lot of terminal output from these printlns (a testimant to how useful we find malli.experimental/defn!).

I was going to take a stab at a PR to make this optional, but I'm stuck unable to understand how malli.instrument/-strument is getting called by malli.experimental/defn. Perhaps someone could help with this?

I'd also be happy to just ditch the printlns if it's too impractical to make them optional.

aiba avatar May 11 '22 04:05 aiba