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
|
|
@ -44,6 +44,9 @@ namespace MapControl
|
|||
public ImageSource ImageSource { get; set; }
|
||||
}
|
||||
|
||||
private static ILogger logger;
|
||||
private static ILogger Logger => logger ?? (logger = ImageLoader.LoggerFactory?.CreateLogger<GroundOverlay>());
|
||||
|
||||
public static readonly DependencyProperty SourcePathProperty =
|
||||
DependencyPropertyHelper.Register<GroundOverlay, string>(nameof(SourcePath), null,
|
||||
async (groundOverlay, oldValue, newValue) => await groundOverlay.LoadAsync(newValue));
|
||||
|
|
@ -84,7 +87,7 @@ namespace MapControl
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ImageLoader.LoggerFactory?.CreateLogger<GroundOverlay>()?.LogError(ex, "Failed loading from {path}", sourcePath);
|
||||
Logger?.LogError(ex, "Failed loading from {path}", sourcePath);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue