saleem-mirza / serilog-sinks-sqlite

A Serilog sink that writes to SQLite
Apache License 2.0
56 stars 44 forks source link

SQL logic error no such table: logs #15

Closed yoandydt closed 5 years ago

yoandydt commented 6 years ago

If LoggerConfiguration SQLite is created with parameters retentionPeriod and retentionCheckInterval the application gives an access error to the tableName because it starts a timer that you are going to try to clean data to a table that has not yet been created.

yoandydt commented 6 years ago

In the class SQLiteSink.cs call InitializeDatabase (); before ... if (retentionPeriod.HasValue) {... and not later. I have done it and correct the error.

SeppPenner commented 5 years ago

@saleem-mirza I guess you can close this as the PR is merged already?