aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Helpers
diff options
context:
space:
mode:
Diffstat (limited to 'Timeline/Helpers')
-rw-r--r--Timeline/Helpers/Log.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/Timeline/Helpers/Log.cs b/Timeline/Helpers/Log.cs
new file mode 100644
index 00000000..ac231810
--- /dev/null
+++ b/Timeline/Helpers/Log.cs
@@ -0,0 +1,24 @@
+using System.Collections.Generic;
+using System.Text;
+
+namespace Timeline.Helpers
+{
+ public static class MyLogHelper
+ {
+ 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)
+ {
+ var builder = new StringBuilder();
+ builder.Append(summary);
+ foreach (var property in properties)
+ {
+ builder.AppendLine();
+ builder.Append(property.Key);
+ builder.Append(" : ");
+ builder.Append(property.Value);
+ }
+ return builder.ToString();
+ }
+ }
+}