mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 00:39:00 +08:00
23 lines
757 B
C#
23 lines
757 B
C#
// Copyright (c) 2025-2026 GeWuYou
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
using GFramework.Core.Abstractions.Logging;
|
|
|
|
namespace GFramework.Core.Logging;
|
|
|
|
/// <summary>
|
|
/// 控制台日志提供程序,用于创建控制台日志记录器实例
|
|
/// </summary>
|
|
public class ConsoleLoggerFactory : ILoggerFactory
|
|
{
|
|
/// <summary>
|
|
/// 获取指定名称的控制台日志记录器实例
|
|
/// </summary>
|
|
/// <param name="name">日志记录器的名称</param>
|
|
/// <param name="minLevel">日志记录器的最小日志级别</param>
|
|
/// <returns>控制台日志记录器实例</returns>
|
|
public ILogger GetLogger(string name, LogLevel minLevel = LogLevel.Info)
|
|
{
|
|
return new ConsoleLogger(name, minLevel);
|
|
}
|
|
} |