refactor(scene): 优化场景过渡管道的日志记录器创建

- 将硬编码字符串替换为 nameof 操作符以提高类型安全性
- 确保日志记录器名称与类名保持一致
- 提高代码可维护性,避免手动字符串输入错误
This commit is contained in:
GeWuYou 2026-02-15 15:57:09 +08:00 committed by gewuyou
parent c0dda5a341
commit 6f61ff55aa

View File

@ -24,7 +24,7 @@ namespace GFramework.Game.scene;
/// </summary>
public class SceneTransitionPipeline
{
private static readonly ILogger Log = LoggerFactoryResolver.Provider.CreateLogger("SceneTransitionPipeline");
private static readonly ILogger Log = LoggerFactoryResolver.Provider.CreateLogger(nameof(SceneTransitionPipeline));
private readonly List<ISceneTransitionHandler> _handlers = [];
private readonly Dictionary<ISceneTransitionHandler, SceneTransitionHandlerOptions> _options = new();