#nullable enable using System; namespace GFramework.SourceGenerators.Attributes.logging; /// /// 标注在类上,Source Generator 会为该类自动生成一个日志记录器字段。 /// [AttributeUsage(AttributeTargets.Class, Inherited = false)] public sealed class LogAttribute : Attribute { public LogAttribute() { } /// /// 初始化 GodotLogAttribute 类的新实例 /// /// 日志分类名,默认使用类名 public LogAttribute(string? name) { Name = name; } /// 日志分类名(默认使用类名) public string? Name { get; set; } /// 生成字段名 public string FieldName { get; set; } = "_log"; /// 是否生成 static 字段 public bool IsStatic { get; set; } = true; /// 访问修饰符 public string AccessModifier { get; set; } = "private"; }