web-resource-inliner icon indicating copy to clipboard operation
web-resource-inliner copied to clipboard

Turn off warnings as well as errors?

Open Heydon opened this issue 8 years ago • 4 comments

The warnings for missing assets are quite verbose. Can I have a way to turn them off? Or is there a way already?

Heydon avatar Oct 14 '16 07:10 Heydon

Not really at the moment. If you set strict to true then an exception gets thrown instead, but I'm quite sure that isn't what you want here :) I'd accept a PR to set a logLevel, but it likely isn't something I'll work on myself.

jrit avatar Oct 14 '16 13:10 jrit

@jrit Thank you for the reply. In my case, the warnings involve using SVG xlink. I tried getting these to be ignored using data-inline as an exception for images.

<a href="#{{slug}}" aria-label="link">
  <svg><use data-inline xlink:href="#icon-link"></use></svg>
</a>

But this didn't work. Any ideas? (I tried data-inline on the <svg> element too...)

Heydon avatar Oct 14 '16 13:10 Heydon

@jrit I'm considering to write a PR for this. Any suggestion on the approach, i.e. the different log levels (or simply a boolean whether to log or not?), and which lines of code are relevant?

tommedema avatar Sep 24 '17 16:09 tommedema

@tommedema that strict option should probably be removed and replaced with a strictness option that takes one of error, warning, silent, or something like that. The current default would be equivalent to warning which I think should be kept. The relevant lines should be easy to find by searching for occurrences of the strict option. Let me know if you have other thoughts.

jrit avatar Oct 02 '17 18:10 jrit