Skip to content

Commit

Permalink
modern Csharpify
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Jul 3, 2024
1 parent acba550 commit 1b4138d
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/Shiny.Logging.Sqlite/SqliteLoggerFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,8 @@
namespace Shiny.Logging.Sqlite;


public class SqliteLoggerProvider : ILoggerProvider
public class SqliteLoggerProvider(LogLevel logLevel, LoggingSqliteConnection conn) : ILoggerProvider
{
readonly LogLevel logLevel;
readonly LoggingSqliteConnection conn;

public SqliteLoggerProvider(LogLevel logLevel, LoggingSqliteConnection conn)
{
this.logLevel = logLevel;
this.conn = conn;
}

public ILogger CreateLogger(string categoryName) => new SqliteLogger(categoryName, this.logLevel, this.conn);
public ILogger CreateLogger(string categoryName) => new SqliteLogger(categoryName, logLevel, conn);
public void Dispose() { }
}

0 comments on commit 1b4138d

Please sign in to comment.