Skip to content

Commit

Permalink
Merge pull request #16 from yoandydt/dev
Browse files Browse the repository at this point in the history
Update SQLiteSink.cs
  • Loading branch information
saleem-mirza authored Aug 30, 2018
2 parents 6ea67f8 + 7ff2a16 commit 4c16b4d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Serilog.Sinks.SQLite/Sinks/SQLite/SQLiteSink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public SQLiteSink(
_tableName = tableName;
_formatProvider = formatProvider;
_storeTimestampInUtc = storeTimestampInUtc;

InitializeDatabase();

if (retentionPeriod.HasValue) {
// impose a min retention period of 15 minute
Expand All @@ -68,8 +70,7 @@ public SQLiteSink(
TimeSpan.FromMinutes(0),
TimeSpan.FromMinutes(retentionCheckMinutes));
}

InitializeDatabase();

}

private static string CreateConnectionString(string dbPath) =>
Expand Down

0 comments on commit 4c16b4d

Please sign in to comment.