saleem-mirza / serilog-sinks-sqlite

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

Exception During Initialization Crashes App #51

Open ntavendale opened 1 month ago

ntavendale commented 1 month ago

System.Data.SQLite.SQLiteException : database disk image is malformed

This exception can occur if app was previously killed in the middle of a database write.

If this occurs when InitializeDatabase call made, application will crash. My App has a file sink and an sqlite sink. Would like it to keep going if sqllite sink can't be initialized and still write to file sink.

Have put up pull request to back up file and create new one if this occurs.