# LogsSettings

**Kind**: interface | **Module**: [Insights](https://docs.interop.io/desktop/reference/javascript/insights/index.md)

**Source**: https://docs.interop.io/desktop/reference/javascript/insights/logssettings/index.html

## Properties

- **`additionalAttributes`** (`{ [x: string]: unknown } | (() => { [x: string]: unknown })`, optional)
  Additional logs attributes to publish as part of each log entry, specified as key/value pairs. You can use environment variables as values. Environment variables must start and end with a percent sign (e.g., `%MyEnvVar%`), and can contain a fallback value (e.g., `%MyEnvVar?literalDefaultValue%`).
- **`additionalResourceAttributes`** (`{ [x: string]: unknown } | (() => { [x: string]: unknown })`, optional)
  Additional attributes to publish as part of the OTEL resource definition, specified as key/value pairs. You can use environment variables as values. Environment variables must start and end with a percent sign (e.g., `%MyEnvVar%`), and can contain a fallback value (e.g., `%MyEnvVar?literalDefaultValue%`).
- **`addResourceAttributesToAttributes`** (`boolean`, optional) default: `false`
  Whether to add resource attributes to log entry attributes.
- **`compression`** (`CompressionAlgorithm`, optional)
  Compression algorithm to use when exporting logs.
- **`concurrencyLimit`** (`number`, optional)
  Maximum number of concurrent logs export requests.
- **`defaults`** (`LogOptions`, optional)
  Default settings if appropriate entries aren't found
  in 'filters' collection.
- **`enabled`** (`boolean`, required) default: `false`
  Whether logging functionality is enabled.
  If disabled, API is still usable, but methods are no-ops.
- **`exporterSettings`** (`OTLPExporterConfigBase`, optional)
  Settings for the OTLP exporter used to send logs.
- **`filters`** (`LogFilter[]`, optional)
  Array of filter entries used to determine whether
  a particular log entry will be emitted, and
  which attributes will be included.

  If no matching filter entry is found,
  the settings from 'defaults' are used.
- **`headers`** (`{ [x: string]: string } | (() => { [x: string]: string })`, optional)
  Additional headers to send in HTTP requests, e.g. when using HTTP exporters.
- **`keepAlive`** (`boolean`, optional) default: `true`
  Whether to keep the connection alive when sending logs.
- **`levelCountMetric`** (`string`, optional) default: `insights_log_level_count`
  Name of log level counter metric, set to null to disable.
- **`logExporters`** (`(exporterSettings: OTLPExporterNodeConfigBase, settings: LogsSettings, otelSettings: Settings) => LogRecordExporter[]`, optional)
  Log record exporters.
- **`loggerProvider`** (`(loggerProviderSettings: LoggerProviderConfig, settings: LogsSettings, otelSettings: Settings) => LoggerProvider`, optional)
  Logger provider instance.
- **`loggerProviderSettings`** (`LoggerProviderConfig`, optional)
  Configuration for the logger provider.
- **`logProcessors`** (`(processorSettings: BatchLogRecordProcessorOptions | undefined, exporterSettings: OTLPExporterNodeConfigBase, settings: LogsSettings, otelSettings: Settings) => LogRecordProcessor[]`, optional)
  Log record processors.
- **`maxAttributeDepth`** (`number`, optional) default: `5`
  How deep the library should recurse into objects when adding
  labels to logs.
- **`processorSettings`** (`BatchLogRecordProcessorOptions`, optional)
  Settings for batching log records before export.
- **`publishInterval`** (`number`, optional)
  Interval in milliseconds between logs export batches.
- **`startupTraceAssociationTimeoutMs`** (`number`, optional)
  How long after application startup will any log entries
  automatically be associated with the application startup trace.
- **`timeoutMillis`** (`number`, optional) default: `10000ms.`
  Maximum time the OTLP exporter will wait for each batch export.
- **`url`** (`string`, optional)
  OTLP logs exporter endpoint URL.
- **`useDefaultFilters`** (`boolean`, optional) default: `true`
  If true, use a predefined list of filters for well-known
  platform logs.

## Related types

- [LogFilter](https://docs.interop.io/desktop/reference/javascript/insights/logfilter/index.md)
- [LogOptions](https://docs.interop.io/desktop/reference/javascript/insights/logoptions/index.md)
- [Settings](https://docs.interop.io/desktop/reference/javascript/insights/settings/index.md)
