We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在学习 使用-详细使用-日志属性 的示例代码中,第 12 行代码:
// 示例代码 Log.Information("Processed {@Count} records in {Time} ms.", new { Count = 10, Time = 123 }); // 我的输出结果 [21:27:40 INF] Processed {"Count": 10, "Time": 123} records in {Time} ms. // 教程给定结果 Processed { Count: 10, Time: 123 } records in 0 ms.
占位符属性 {Time} 没有对应的参数,我的运行结果是直接输出了属性名而非一个值。 是由于版本不同而出现的不同结果么?
{Time}
Serilog version: 3.1.1 Serilog.Sinks.Console version: 5.0.1 Visual Studio 2022 version: 17.9.6 .NET version: 8.0.4
Serilog
Serilog.Sinks.Console
.NET
The text was updated successfully, but these errors were encountered:
此外,还有一项疑问。 在 使用-详细使用-输出到文件,第九行的注释: //单个文件大小: 1024000 1024000是1M,我有一些不同的观点。
//单个文件大小: 1024000 1024000是1M
根据我了解到的一些知识, 基于 计算机二进制的特性,1024 的关系来说,我觉得 1 MB = 1 * 1024 * 1024 = 1,048,576 Bytes; 基于 SI(国际单位制)中的标准,1000 的关系来说,这种情况 1 MB = 1,000,000 Bytes。
是否计算错误了,还请为我解惑。谢谢!
Sorry, something went wrong.
No branches or pull requests
在学习 使用-详细使用-日志属性 的示例代码中,第 12 行代码:
占位符属性
{Time}
没有对应的参数,我的运行结果是直接输出了属性名而非一个值。是由于版本不同而出现的不同结果么?
Serilog
version: 3.1.1Serilog.Sinks.Console
version: 5.0.1Visual Studio 2022 version: 17.9.6
.NET
version: 8.0.4The text was updated successfully, but these errors were encountered: