public Logger(ILogColors logColors, string name = null, bool includeVersion = false) { this.logColors = logColors; IncludeVersion = includeVersion; if (!string.IsNullOrWhiteSpace(name)) { Name = name; return; } var type = logColors.GetType(); Name = type.GetCustomAttributePropertyValue<LoggerNameAttribute, string>(attr => attr.Name, type.Name); }
public Logger(ILogColors logColors, string name = null, bool includeVersion = false) { this.logColors = logColors; IncludeVersion = includeVersion; if (!string.IsNullOrWhiteSpace(name)) { Name = name; return; } var type = logColors.GetType(); Name = type.GetCustomAttributePropertyValue <LoggerNameAttribute, string>(attr => attr.Name, type.Name); }