(message: LiveLogMessage, formatter: EventFormatter)
| 88 | * @param formatter a format function that controls how data is displayed |
| 89 | */ |
| 90 | export const logEvent = (message: LiveLogMessage, formatter: EventFormatter): void => { |
| 91 | const eventFormat = formatter(message) |
| 92 | const outputString = formatTimePrefix.concat(eventFormat.formatString) |
| 93 | const outputArgs = eventFormat.formatArgs |
| 94 | ? [eventFormat.time].concat(eventFormat.formatArgs) |
| 95 | : [eventFormat.time] |
| 96 | |
| 97 | console.log(outputString, ...outputArgs) |
| 98 | } |
no outgoing calls
no test coverage detected