rasmusjp / umbraco-multi-url-picker

Multi Url Picker for Umbraco 7
MIT License
31 stars 29 forks source link

Overly verbose logging of warnings in tracelog #31

Closed DanDiplo closed 9 years ago

DanDiplo commented 9 years ago

First, a big thanks for this project - I use it on nearly every site I develop and it's always worked great.

I only have one tiny issue, and that is that (by default) MultiUrlPicker creates a lot of warnings in the Umbraco trace log when it skips a node that no longer exist. Example from my tracelog file:

[T164/D2] MultiUrlPicker value converter skipped a link as the node has been upublished/deleted (Id: 2424)

For a large site the number of log entries can become overwhelming. For instance, I'm looking at one site I built (that has a lot of nodes) and the log file for just one day has over 7,000 instances of this warning being logged.

Would it be possible to disable warnings or have a way of configuring it so these warning are disabled? I can understand they might be useful for debugging, but for most people they aren't of any use. Thanks!

rasmusjp commented 9 years ago

Hi

Since Umbraco uses log4net it should be possible to disable this using a filter.

<filter type="log4net.Filter.LoggerMatchFilter">
  <loggerToMatch value="RJP.MultiUrlPicker" />
  <acceptOnMatch value="false" />
</filter>

Have a look at https://logging.apache.org/log4net/release/manual/configuration.html

DanDiplo commented 9 years ago

Hey, that's a great tip, thanks :+1: