(logEvent: { [key: string]: string | number | boolean }, properties?: {})
| 131 | } |
| 132 | |
| 133 | export function addToLogEvent(logEvent: { [key: string]: string | number | boolean }, properties?: {}): void { |
| 134 | if (logEvent[Log.PropertyName.Reserved.Status] === Log.Status[Log.Status.Failed]) { |
| 135 | logEvent[Log.PropertyName.Reserved.StackTrace] = Log.Failure.getStackTrace(); |
| 136 | } |
| 137 | |
| 138 | if (properties) { |
| 139 | for (let name in properties) { |
| 140 | if (properties.hasOwnProperty(name)) { |
| 141 | let propValue: string; |
| 142 | if (typeof (properties[name]) === "object") { |
| 143 | propValue = JSON.stringify(properties[name]); |
| 144 | } else { |
| 145 | propValue = properties[name]; |
| 146 | } |
| 147 | |
| 148 | logEvent[name] = propValue; |
| 149 | } |
| 150 | } |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | export function isConsoleOutputEnabled(): boolean { |
| 155 | try { |
no outgoing calls
no test coverage detected