mirror of
https://github.com/Radarr/Radarr.git
synced 2024-10-03 22:57:18 +02:00
fixup: some tests for log files
This commit is contained in:
parent
296ec6c565
commit
5330815e1b
@ -97,6 +97,11 @@ protected override void Write(LogEventInfo logEvent)
|
||||
WritePostgresLog(log, connectionString);
|
||||
}
|
||||
}
|
||||
catch (NpgsqlException ex)
|
||||
{
|
||||
InternalLogger.Error("Unable to save log event to database: {0}", ex);
|
||||
throw;
|
||||
}
|
||||
catch (SQLiteException ex)
|
||||
{
|
||||
InternalLogger.Error("Unable to save log event to database: {0}", ex);
|
||||
@ -128,10 +133,8 @@ private void WritePostgresLog(Log log, string connectionString)
|
||||
private void WriteSqliteLog(Log log, string connectionString)
|
||||
{
|
||||
using (var connection =
|
||||
new SQLiteConnection(_connectionStringFactory.LogDbConnectionString).OpenAndReturn())
|
||||
new SQLiteConnection(connectionString).OpenAndReturn())
|
||||
{
|
||||
connection.ConnectionString = connectionString;
|
||||
connection.Open();
|
||||
using (var sqlCommand = connection.CreateCommand())
|
||||
{
|
||||
sqlCommand.CommandText = INSERT_COMMAND;
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
|
Loading…
Reference in New Issue
Block a user