> ## Documentation Index
> Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Logs

> This topic explains how to use LaunchDarkly's observability features to view session logs.

> For the complete documentation index, see [llms.txt](/llms.txt). For the full documentation snapshot, see [llms-full.txt](/llms-full.txt).

## Overview

This topic explains how to use LaunchDarkly's observability features to view session logs. The **Logs** page displays a list of logs for your application. You can use the page to view the logs for a specific time range. Logs have different levels: `Debug`, `Info`, `Warn`, and `Error`.

<Frame caption="A view of the Logs page, with a specific log highlighted.">
  ![A view of the Logs page, with a specific log highlighted.](https://files.buildwithfern.com/https://launchdarkly.docs.buildwithfern.com/docs/5980d25a623f5949a90ed986cdf6cacb9265bc255d5d05e3cc2d5153046bece2/assets/images/__LD_UI_no_test/errors-logs.png)
</Frame>

Click any log entry to see more details about the event, such as the session ID, the source of the event, and more. Click **Related session** to see the session replay for the log entry.

<Frame caption="A detailed view of a log entry.">
  ![A detailed view of a log entry.](https://files.buildwithfern.com/https://launchdarkly.docs.buildwithfern.com/docs/80f97cdf8f3522a7deeeaa09009336aaecf4b445935b547f04c9740fc5db2a20/assets/images/__LD_UI_no_test/errors-logs-details.png)
</Frame>

## Get started

To instrument your application to capture logs, read the documentation on [Observability SDKs](/sdk/observability). The functionality is available through plugins to the LaunchDarkly JavaScript SDK.

To view logs for your application, expand **Observe**, click **Logs**, then select a log from the list.

## Search

To learn more about the search specification for the logs view, read [Search specification](/home/observability/search).

### Search attributes

By default, the observability SDK plugin automatically injects the following attributes to provide additional help with searching for logs:

\| Category

\| Attribute

\| Description

| Example |
| - |

\| ---

\| ---

\| --- |
\| Feature flag

\| `feature_flag`

\| Specifies whether the session is associated with a feature flag. You can refine results with the following additional attributes: `context.id` , `contextKeys` , `key` , `provider.name` , `result.reason.inExperiment` , `result.reason.kind` , `result.value` , and `set.id` .

\| `true` |
\| Log properties

\| `code.filepath`

\| File path emitting the log.

\| `/build/backend/worker/worker.go` |
\| `code.function`

\| Function emitting the log.

\| `github.com/acme-org/acme/backend/worker.(*Worker).Start.func3` |
\| `code.lineno`

\| Line number of the file where the log was emitted.

\| `20` |
\| `level`

\| The log level.

\| `info` |
\| `message`

\| The log message.

\| `public-graph graphql request failed` |
\| `span_id`

\| Span ID that contains this log.

\| `528a54addf6f91cc` |
\| `trace_id`

\| Trace ID that contains this log.

\| `7654ff38c4631d5a51b26f7e637eea3c` |
\| Service and application

\| `environment`

\| The environment key, based on the SDK credentials used in the [observability SDKs](/sdk/observability) .

\| `production` |
\| `host.name`

\| The hostname.

\| `ip-172-31-5-211.us-east-2.compute.internal` |
\| `os.description`

\| Description of the operating system.

\| `Alpine Linux 3.17.2 (Linux ip-172-31-5-211.us-east-2.compute.internal 5.10.167-147.601.amzn2.aarch64 #1 SMP Tue Feb 14 21:50:23 UTC 2023 arch64)` |
\| `os.type`

\| Type of operating system.

\| `linux` |
\| `secure_session_id`

\| Session ID that contains the log.

\| `wh1jcuN5F9G6Ra5CKeCjdIk6Rbyd` |
\| `service_name`

\| Name of the service specified in the SDK plugin. To learn more, read [Versioning sessions and errors](/sdk/features/observability-config-client-side#versioning-sessions-and-errors) .

\| `private-graph` |
\| `service_version`

\| Version of the service specified in the observability SDK plugin. To learn more, read [Versioning sessions and errors](/sdk/features/observability-config-client-side#versioning-sessions-and-errors) .

\| `e1845285cb360410aee05c61dd0cc57f85afe6da` |
\| `source`

\| General origin of the log.

\| `backend` |
