blob: 123e8a8ee6d77d47cbd44e3c619dcdc787d24912 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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();
}
}
}
|