This commit is contained in:
ClemensFischer 2025-03-31 20:55:57 +02:00
parent d01a948cf4
commit 4c5321958a
3 changed files with 6 additions and 15 deletions

View file

@ -39,11 +39,6 @@ namespace MapControl.Caching
public SQLiteCache(SQLiteCacheOptions options, ILoggerFactory loggerFactory = null)
{
if (loggerFactory != null)
{
logger = loggerFactory.CreateLogger<SQLiteCache>();
}
var path = options.Path;
if (string.IsNullOrEmpty(path) || string.IsNullOrEmpty(Path.GetExtension(path)))
@ -64,6 +59,8 @@ namespace MapControl.Caching
command.ExecuteNonQuery();
}
logger = loggerFactory?.CreateLogger<SQLiteCache>();
logger?.LogInformation("Opened database {path}", path);
if (options.ExpirationScanFrequency > TimeSpan.Zero)