(key: Log.Context.Custom, value: string)
| 70 | } |
| 71 | |
| 72 | export function createSetContextEventAsJson(key: Log.Context.Custom, value: string): { [key: string]: string } { |
| 73 | let baseEvent = new Log.Event.BaseEvent(Log.Event.Label.SetContextProperty); |
| 74 | let event = LogHelpers.createBaseEventAsJson(Log.Event.Category[baseEvent.getEventCategory()], baseEvent.getLabel()); |
| 75 | |
| 76 | let keyAsString = Log.Context.toString(key); |
| 77 | event[Log.PropertyName.Custom[Log.PropertyName.Custom.Key]] = keyAsString; |
| 78 | |
| 79 | event[Log.PropertyName.Custom[Log.PropertyName.Custom.Value]] = value; |
| 80 | |
| 81 | return event; |
| 82 | } |
| 83 | |
| 84 | export function createFailureEventAsJson(label: Log.Failure.Label, failureType: Log.Failure.Type, failureInfo?: OneNoteApi.GenericError, id?: string): { [key: string]: string } { |
| 85 | let failureEvent: { [key: string]: string } = LogHelpers.createBaseEventAsJson(Log.Failure.category, Log.Failure.Label[label]); |
nothing calls this directly
no test coverage detected