|
1 | | -using System; |
| 1 | +using SenseNet.Configuration; |
| 2 | +using System; |
2 | 3 | using System.Collections.Generic; |
3 | 4 | using System.Diagnostics; |
4 | 5 | using System.Linq; |
@@ -49,6 +50,7 @@ public AuditEventInfo(IAuditEvent auditEvent, IDictionary<string, object> proper |
49 | 50 |
|
50 | 51 | var process = Process.GetCurrentProcess(); |
51 | 52 | var thread = Thread.CurrentThread; |
| 53 | + var props = Providers.Instance.PropertyCollector.Collect(properties); |
52 | 54 |
|
53 | 55 | _auditEvent = auditEvent; |
54 | 56 | Timestamp = DateTime.UtcNow; |
@@ -78,23 +80,23 @@ public AuditEventInfo(IAuditEvent auditEvent, IDictionary<string, object> proper |
78 | 80 | sb.AppendFormat(" <Win32ThreadId>{0}</Win32ThreadId>", ThreadId).AppendLine(); |
79 | 81 | sb.AppendFormat(" <ThreadName>{0}</ThreadName>", ThreadName).AppendLine(); |
80 | 82 | sb.AppendFormat(" <ExtendedProperties>").AppendLine(); |
81 | | - foreach (var prop in properties) |
| 83 | + foreach (var prop in props) |
82 | 84 | sb.AppendFormat(" <{0}>{1}</{0}>", prop.Key, formatValue(prop.Value)).AppendLine(); |
83 | 85 | sb.AppendFormat(" </ExtendedProperties>").AppendLine(); |
84 | 86 | sb.AppendFormat("</LogEntry>").AppendLine(); |
85 | 87 |
|
86 | 88 | FormattedMessage = sb.ToString(); |
87 | 89 |
|
88 | | - properties.TryGetValue("Category", out var category); |
| 90 | + props.TryGetValue("Category", out var category); |
89 | 91 | Category = (string)category; |
90 | 92 |
|
91 | | - properties.TryGetValue("Id", out var id); |
| 93 | + props.TryGetValue("Id", out var id); |
92 | 94 | ContentId = (int?)id ?? 0; |
93 | 95 |
|
94 | | - properties.TryGetValue("Path", out var path); |
| 96 | + props.TryGetValue("Path", out var path); |
95 | 97 | ContentPath = (string)path; |
96 | 98 |
|
97 | | - properties.TryGetValue("UserName", out var userName); |
| 99 | + props.TryGetValue("UserName", out var userName); |
98 | 100 | UserName = (string)userName; |
99 | 101 | } |
100 | 102 | } |
|
0 commit comments