aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Helpers/Log.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-10-24 20:15:58 +0800
committerGitHub <noreply@github.com>2019-10-24 20:15:58 +0800
commit7305358a88ffc87f51f7b78deb4f07ef99120beb (patch)
tree7ca5010a06829cc5fadea1ea17ae72d082fc344c /Timeline/Helpers/Log.cs
parent297d0c9029360f1d5334ed843b9b299356740ec1 (diff)
parenta0f3cd7599a48c14fb5492fb1c6e2dbd0a82fb45 (diff)
downloadtimeline-7305358a88ffc87f51f7b78deb4f07ef99120beb.tar.gz
timeline-7305358a88ffc87f51f7b78deb4f07ef99120beb.tar.bz2
timeline-7305358a88ffc87f51f7b78deb4f07ef99120beb.zip
Merge pull request #50 from crupest/refactor
Refactor : A Huge Step
Diffstat (limited to 'Timeline/Helpers/Log.cs')
-rw-r--r--Timeline/Helpers/Log.cs11
1 files changed, 5 insertions, 6 deletions
diff --git a/Timeline/Helpers/Log.cs b/Timeline/Helpers/Log.cs
index 123e8a8e..68c975fa 100644
--- a/Timeline/Helpers/Log.cs
+++ b/Timeline/Helpers/Log.cs
@@ -3,20 +3,19 @@ using System.Text;
namespace Timeline.Helpers
{
- public static class MyLogHelper
+ public static class Log
{
- public static KeyValuePair<string, object> Pair(string key, object value) => new KeyValuePair<string, object>(key, value);
-
- public static string FormatLogMessage(string summary, params KeyValuePair<string, object>[] properties)
+ public static string Format(string summary, params (string, object?)[] properties)
{
var builder = new StringBuilder();
builder.Append(summary);
foreach (var property in properties)
{
+ var (key, value) = property;
builder.AppendLine();
- builder.Append(property.Key);
+ builder.Append(key);
builder.Append(" : ");
- builder.Append(property.Value);
+ builder.Append(value);
}
return builder.ToString();
}