MCPcopy Create free account
hub / github.com/anus-dev/ANUS / logSlashCommand

Function logSlashCommand

packages/core/src/telemetry/loggers.ts:345–364  ·  view source on GitHub ↗
(
  config: Config,
  event: SlashCommandEvent,
)

Source from the content-addressed store, hash-verified

343}
344
345export 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
366export function logIdeConnection(
367 config: Config,

Callers 1

useSlashCommandProcessorFunction · 0.85

Calls 4

logSlashCommandEventMethod · 0.80
getCommonAttributesFunction · 0.70
getInstanceMethod · 0.45

Tested by

no test coverage detected