Skip to content

Commit 55e0cde

Browse files
committed
feat(logger): 添加支持四到八个属性值的警告消息记录方法
1 parent d393b04 commit 55e0cde

1 file changed

Lines changed: 120 additions & 0 deletions

File tree

GameFrameX.Foundation.Logger/LogHelper.Warning.cs

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,126 @@ public static void Warning<T0, T1, T2>(string messageTemplate, T0 propertyValue0
122122
GetLogger().Warning(messageTemplate, propertyValue0, propertyValue1, propertyValue2);
123123
}
124124

125+
/// <summary>
126+
/// 记录带有四个属性值的警告消息模板。
127+
/// </summary>
128+
/// <typeparam name="T0">第一个属性值的类型 / The type of the first property value</typeparam>
129+
/// <typeparam name="T1">第二个属性值的类型 / The type of the second property value</typeparam>
130+
/// <typeparam name="T2">第三个属性值的类型 / The type of the third property value</typeparam>
131+
/// <typeparam name="T3">第四个属性值的类型 / The type of the fourth property value</typeparam>
132+
/// <param name="messageTemplate">消息模板 / The message template</param>
133+
/// <param name="propertyValue0">第一个属性值 / The first property value</param>
134+
/// <param name="propertyValue1">第二个属性值 / The second property value</param>
135+
/// <param name="propertyValue2">第三个属性值 / The third property value</param>
136+
/// <param name="propertyValue3">第四个属性值 / The fourth property value</param>
137+
/// <remarks>
138+
/// Uses structured logging to record warning level messages with four properties.
139+
/// </remarks>
140+
public static void Warning<T0, T1, T2, T3>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2, T3 propertyValue3)
141+
{
142+
GetLogger().Warning(messageTemplate, propertyValue0, propertyValue1, propertyValue2, propertyValue3);
143+
}
144+
145+
/// <summary>
146+
/// 记录带有五个属性值的警告消息模板。
147+
/// </summary>
148+
/// <typeparam name="T0">第一个属性值的类型 / The type of the first property value</typeparam>
149+
/// <typeparam name="T1">第二个属性值的类型 / The type of the second property value</typeparam>
150+
/// <typeparam name="T2">第三个属性值的类型 / The type of the third property value</typeparam>
151+
/// <typeparam name="T3">第四个属性值的类型 / The type of the fourth property value</typeparam>
152+
/// <typeparam name="T4">第五个属性值的类型 / The type of the fifth property value</typeparam>
153+
/// <param name="messageTemplate">消息模板 / The message template</param>
154+
/// <param name="propertyValue0">第一个属性值 / The first property value</param>
155+
/// <param name="propertyValue1">第二个属性值 / The second property value</param>
156+
/// <param name="propertyValue2">第三个属性值 / The third property value</param>
157+
/// <param name="propertyValue3">第四个属性值 / The fourth property value</param>
158+
/// <param name="propertyValue4">第五个属性值 / The fifth property value</param>
159+
/// <remarks>
160+
/// Uses structured logging to record warning level messages with five properties.
161+
/// </remarks>
162+
public static void Warning<T0, T1, T2, T3, T4>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2, T3 propertyValue3, T4 propertyValue4)
163+
{
164+
GetLogger().Warning(messageTemplate, propertyValue0, propertyValue1, propertyValue2, propertyValue3, propertyValue4);
165+
}
166+
167+
/// <summary>
168+
/// 记录带有六个属性值的警告消息模板。
169+
/// </summary>
170+
/// <typeparam name="T0">第一个属性值的类型 / The type of the first property value</typeparam>
171+
/// <typeparam name="T1">第二个属性值的类型 / The type of the second property value</typeparam>
172+
/// <typeparam name="T2">第三个属性值的类型 / The type of the third property value</typeparam>
173+
/// <typeparam name="T3">第四个属性值的类型 / The type of the fourth property value</typeparam>
174+
/// <typeparam name="T4">第五个属性值的类型 / The type of the fifth property value</typeparam>
175+
/// <typeparam name="T5">第六个属性值的类型 / The type of the sixth property value</typeparam>
176+
/// <param name="messageTemplate">消息模板 / The message template</param>
177+
/// <param name="propertyValue0">第一个属性值 / The first property value</param>
178+
/// <param name="propertyValue1">第二个属性值 / The second property value</param>
179+
/// <param name="propertyValue2">第三个属性值 / The third property value</param>
180+
/// <param name="propertyValue3">第四个属性值 / The fourth property value</param>
181+
/// <param name="propertyValue4">第五个属性值 / The fifth property value</param>
182+
/// <param name="propertyValue5">第六个属性值 / The sixth property value</param>
183+
/// <remarks>
184+
/// Uses structured logging to record warning level messages with six properties.
185+
/// </remarks>
186+
public static void Warning<T0, T1, T2, T3, T4, T5>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2, T3 propertyValue3, T4 propertyValue4, T5 propertyValue5)
187+
{
188+
GetLogger().Warning(messageTemplate, propertyValue0, propertyValue1, propertyValue2, propertyValue3, propertyValue4, propertyValue5);
189+
}
190+
191+
/// <summary>
192+
/// 记录带有七个属性值的警告消息模板。
193+
/// </summary>
194+
/// <typeparam name="T0">第一个属性值的类型 / The type of the first property value</typeparam>
195+
/// <typeparam name="T1">第二个属性值的类型 / The type of the second property value</typeparam>
196+
/// <typeparam name="T2">第三个属性值的类型 / The type of the third property value</typeparam>
197+
/// <typeparam name="T3">第四个属性值的类型 / The type of the fourth property value</typeparam>
198+
/// <typeparam name="T4">第五个属性值的类型 / The type of the fifth property value</typeparam>
199+
/// <typeparam name="T5">第六个属性值的类型 / The type of the sixth property value</typeparam>
200+
/// <typeparam name="T6">第七个属性值的类型 / The type of the seventh property value</typeparam>
201+
/// <param name="messageTemplate">消息模板 / The message template</param>
202+
/// <param name="propertyValue0">第一个属性值 / The first property value</param>
203+
/// <param name="propertyValue1">第二个属性值 / The second property value</param>
204+
/// <param name="propertyValue2">第三个属性值 / The third property value</param>
205+
/// <param name="propertyValue3">第四个属性值 / The fourth property value</param>
206+
/// <param name="propertyValue4">第五个属性值 / The fifth property value</param>
207+
/// <param name="propertyValue5">第六个属性值 / The sixth property value</param>
208+
/// <param name="propertyValue6">第七个属性值 / The seventh property value</param>
209+
/// <remarks>
210+
/// Uses structured logging to record warning level messages with seven properties.
211+
/// </remarks>
212+
public static void Warning<T0, T1, T2, T3, T4, T5, T6>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2, T3 propertyValue3, T4 propertyValue4, T5 propertyValue5, T6 propertyValue6)
213+
{
214+
GetLogger().Warning(messageTemplate, propertyValue0, propertyValue1, propertyValue2, propertyValue3, propertyValue4, propertyValue5, propertyValue6);
215+
}
216+
217+
/// <summary>
218+
/// 记录带有八个属性值的警告消息模板。
219+
/// </summary>
220+
/// <typeparam name="T0">第一个属性值的类型 / The type of the first property value</typeparam>
221+
/// <typeparam name="T1">第二个属性值的类型 / The type of the second property value</typeparam>
222+
/// <typeparam name="T2">第三个属性值的类型 / The type of the third property value</typeparam>
223+
/// <typeparam name="T3">第四个属性值的类型 / The type of the fourth property value</typeparam>
224+
/// <typeparam name="T4">第五个属性值的类型 / The type of the fifth property value</typeparam>
225+
/// <typeparam name="T5">第六个属性值的类型 / The type of the sixth property value</typeparam>
226+
/// <typeparam name="T6">第七个属性值的类型 / The type of the seventh property value</typeparam>
227+
/// <typeparam name="T7">第八个属性值的类型 / The type of the eighth property value</typeparam>
228+
/// <param name="messageTemplate">消息模板 / The message template</param>
229+
/// <param name="propertyValue0">第一个属性值 / The first property value</param>
230+
/// <param name="propertyValue1">第二个属性值 / The second property value</param>
231+
/// <param name="propertyValue2">第三个属性值 / The third property value</param>
232+
/// <param name="propertyValue3">第四个属性值 / The fourth property value</param>
233+
/// <param name="propertyValue4">第五个属性值 / The fifth property value</param>
234+
/// <param name="propertyValue5">第六个属性值 / The sixth property value</param>
235+
/// <param name="propertyValue6">第七个属性值 / The seventh property value</param>
236+
/// <param name="propertyValue7">第八个属性值 / The eighth property value</param>
237+
/// <remarks>
238+
/// Uses structured logging to record warning level messages with eight properties.
239+
/// </remarks>
240+
public static void Warning<T0, T1, T2, T3, T4, T5, T6, T7>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2, T3 propertyValue3, T4 propertyValue4, T5 propertyValue5, T6 propertyValue6, T7 propertyValue7)
241+
{
242+
GetLogger().Warning(messageTemplate, propertyValue0, propertyValue1, propertyValue2, propertyValue3, propertyValue4, propertyValue5, propertyValue6, propertyValue7);
243+
}
244+
125245
/// <summary>
126246
/// 记录带有异常的警告消息模板。
127247
/// </summary>

0 commit comments

Comments
 (0)