add db connect logging
This commit is contained in:
parent
91aab66857
commit
93bf60c9e2
|
@ -54,9 +54,18 @@ namespace MediaBrowser.ServerApplication.Native
|
|||
_logger = logger;
|
||||
}
|
||||
|
||||
public Task<IDbConnection> Connect(string dbPath)
|
||||
public async Task<IDbConnection> Connect(string dbPath)
|
||||
{
|
||||
return SqliteExtensions.ConnectToDb(dbPath, _logger);
|
||||
try
|
||||
{
|
||||
return await SqliteExtensions.ConnectToDb(dbPath, _logger).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.ErrorException("Error opening database {0}", ex, dbPath);
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user