16 lines
No EOL
531 B
C#
16 lines
No EOL
531 B
C#
using Microsoft.Extensions.Configuration;
|
|
|
|
namespace API.Extensions
|
|
{
|
|
public static class ConfigurationExtensions
|
|
{
|
|
public static int GetMaxRollingFiles(this IConfiguration config)
|
|
{
|
|
return int.Parse(config.GetSection("Logging").GetSection("File").GetSection("MaxRollingFiles").Value);
|
|
}
|
|
public static string GetLoggingFileName(this IConfiguration config)
|
|
{
|
|
return config.GetSection("Logging").GetSection("File").GetSection("Path").Value;
|
|
}
|
|
}
|
|
} |