{"version":3,"file":"LogRecordProcessor.js","sourceRoot":"","sources":["../../src/LogRecordProcessor.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Context } from '@opentelemetry/api';\nimport type { InstrumentationScope } from '@opentelemetry/core';\nimport type { SdkLogRecord } from './export/SdkLogRecord';\nimport type { SeverityNumber } from '@opentelemetry/api-logs';\n\nexport interface LogRecordProcessor {\n  /**\n   * Forces to export all finished log records\n   */\n  forceFlush(): Promise<void>;\n\n  /**\n   * Called when a {@link LogRecord} is emit\n   * @param logRecord the ReadWriteLogRecord that just emitted.\n   * @param context the current Context, or an empty Context if the Logger was obtained with include_trace_context=false\n   */\n  onEmit(logRecord: SdkLogRecord, context?: Context): void;\n\n  /**\n   * Shuts down the processor. Called when SDK is shut down. This is an\n   * opportunity for processor to do any cleanup required.\n   */\n  shutdown(): Promise<void>;\n\n  /**\n   * Tells if the logger is enabled for the given context, severity number and event\n   * name if provided.\n   * @param options\n   */\n  enabled?(options: {\n    context: Context;\n    instrumentationScope: InstrumentationScope;\n    severityNumber?: SeverityNumber;\n    eventName?: string;\n  }): boolean;\n}\n"]}