rasmusjp / umbraco-multi-url-picker

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

Log info message with UDI instead of ID for unpublished node #86

Open ronaldbarendse opened 6 years ago

ronaldbarendse commented 6 years ago

Because only the UDI is saved to the database, the ID of unpublished/deleted nodes can't be retrieved (the IPublishedContent isn't initialized) and the log is filled with meaningless warnings:

MultiUrlPicker value converter skipped a link as the node has been unpublished/deleted (Id: ),

Besides changing the ID to UDI, I've changed the level from warning to informational, because it's not something that actually goes wrong. The built-in Umbraco.MultiNodeTreePicker2 doesn't even log these (see https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiNodeTreePickerPropertyConverter.cs). The message itself also doesn't need to repeat the property editor, because the logger name is already RJP.MultiUrlPicker.Models.MultiUrls.