( config: Config, event: SlashCommandEvent, )
| 343 | } |
| 344 | |
| 345 | export function logSlashCommand( |
| 346 | config: Config, |
| 347 | event: SlashCommandEvent, |
| 348 | ): void { |
| 349 | ClearcutLogger.getInstance(config)?.logSlashCommandEvent(event); |
| 350 | if (!isTelemetrySdkInitialized()) return; |
| 351 | |
| 352 | const attributes: LogAttributes = { |
| 353 | ...getCommonAttributes(config), |
| 354 | ...event, |
| 355 | 'event.name': EVENT_SLASH_COMMAND, |
| 356 | }; |
| 357 | |
| 358 | const logger = logs.getLogger(SERVICE_NAME); |
| 359 | const logRecord: LogRecord = { |
| 360 | body: `Slash command: ${event.command}.`, |
| 361 | attributes, |
| 362 | }; |
| 363 | logger.emit(logRecord); |
| 364 | } |
| 365 | |
| 366 | export function logIdeConnection( |
| 367 | config: Config, |
no test coverage detected