mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Improved logging
This commit is contained in:
parent
fce05c2ed1
commit
2d97f1f2c7
13 changed files with 57 additions and 31 deletions
|
|
@ -22,6 +22,9 @@ namespace MapControl
|
|||
/// </summary>
|
||||
public class WmtsTileLayer : MapTileLayerBase
|
||||
{
|
||||
private static ILogger logger;
|
||||
private static ILogger Logger => logger ?? (logger = ImageLoader.LoggerFactory?.CreateLogger<WmtsTileLayer>());
|
||||
|
||||
public static readonly DependencyProperty CapabilitiesUriProperty =
|
||||
DependencyPropertyHelper.Register<WmtsTileLayer, Uri>(nameof(CapabilitiesUri), null,
|
||||
(layer, oldValue, newValue) => layer.TileMatrixSets.Clear());
|
||||
|
|
@ -202,7 +205,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ImageLoader.LoggerFactory?.CreateLogger<WmtsTileLayer>()?.LogError(ex, "Failed reading capabilities from {uri}", CapabilitiesUri);
|
||||
Logger?.LogError(ex, "Failed reading capabilities from {uri}", CapabilitiesUri);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue