mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 13:53:19 -07:00
Added logging
This commit is contained in:
parent
73635e06c3
commit
3dcf55ce7a
12 changed files with 120 additions and 14 deletions
|
@ -30,10 +30,13 @@ using System.IO;
|
|||
|
||||
using Mono.Data.Sqlite;
|
||||
|
||||
using NLog;
|
||||
|
||||
namespace PlexRequests.Store
|
||||
{
|
||||
public class DbConfiguration : ISqliteConfiguration
|
||||
{
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
public DbConfiguration(SqliteFactory provider)
|
||||
{
|
||||
Factory = provider;
|
||||
|
@ -43,8 +46,10 @@ namespace PlexRequests.Store
|
|||
|
||||
public virtual void CheckDb()
|
||||
{
|
||||
Log.Trace("Checking DB");
|
||||
if (!File.Exists(DbFile))
|
||||
{
|
||||
Log.Trace("DB doesn't exist, creating a new one");
|
||||
CreateDatabase();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue