feat: Add a logger to embed init options
Add an option to the embed function.
It allows to pass a custom logger to the view.
We should also pass the logger to Vega-Lite.
Isn't it already done since the part that adds the logger works with both Vega and Vega-Lite specs ? The mode having been guessed a few lines before.
I don't think it is. We call compile in the preprocessor in https://github.com/vega/vega-embed/pull/732/files#diff-b0761852e43b4566f7d72f8bc18bc1a7fd5db43c5ad1d9dfcc4529afe86d0174R108. But we are not passing the logger in (docs at https://vega.github.io/vega-lite/usage/compile.html#javascript). Could you update the code to make it work? I think the best would probably be to remove the preprocessor variable and just conditionally call vl.compile on the spec.
@challet can you finish up the pull request?
@domoritz sorry it went out of my scope. I haven't added a test for the last change though and I will have a closer look at it.
Thank you. Can you make sure the test pass?
Ping @challet
Sorry, I will have a look in the next days.