(data: LogData)
| 8 | */ |
| 9 | export class CloudwatchLogFormatter implements ILogFormatter { |
| 10 | format(data: LogData): string { |
| 11 | const { awsRequestId, level, msg } = data; |
| 12 | |
| 13 | // extract parts for message format |
| 14 | const time = new Date().toISOString(); |
| 15 | const levelTag = formatLevel(level); |
| 16 | |
| 17 | return `${time}${ |
| 18 | awsRequestId ? `\t${awsRequestId}` : '' |
| 19 | }\t${levelTag}\t${msg}\t${JSON.stringify(data)}`; |
| 20 | } |
| 21 | } |
nothing calls this directly
no test coverage detected