| 59 | if (typeof line === 'object' && line !== null && typeof (line as Record<string, unknown>)['message'] === 'string') { |
| 60 | const entry = line as Record<string, unknown>; |
| 61 | const text = (name: string) => typeof entry[name] === 'string' ? entry[name] as string : ''; |
| 62 | const detail = typeof entry['detail'] === 'string' ? entry['detail'] : undefined; |
| 63 | const repeat = repeatCount(detail); |
| 64 | return { key: JSON.stringify([record.level, record.source, record.project ?? '', text('message'), (countedDetail(detail) ?? '').slice(0, 2048), |