Files
EonaCat.Logger/EonaCat.Logger/EonaCatCoreLogger/DatabaseLoggerProvider.cs

27 lines
748 B
C#

using Microsoft.Extensions.Logging;
namespace EonaCat.Logger.EonaCatCoreLogger
{
// This file is part of the EonaCat project(s) which is released under the Apache License.
// See the LICENSE file or go to https://EonaCat.com/License for full license details.
public class DatabaseLoggerProvider : ILoggerProvider
{
private readonly DatabaseLoggerOptions _options;
public DatabaseLoggerProvider(DatabaseLoggerOptions options)
{
_options = options;
}
public ILogger CreateLogger(string categoryName)
{
return new DatabaseLogger(categoryName, _options);
}
public void Dispose()
{
// Nothing to dispose
}
}
}