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

# Logs

<View title="Developer" />

<View title="Federal docs" />

<View title="EU docs" />

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.">
  <img src="https://mintcdn.com/launchdarkly/YIC2H8XW-fomhquw/images/__LD_UI_no_test/errors-logs.png?fit=max&auto=format&n=YIC2H8XW-fomhquw&q=85&s=5d112d102afa9e949a5386dd06de6342" alt="A view of the Logs page, with a specific log highlighted." width="1570" height="920" data-path="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.">
  <img src="https://mintcdn.com/launchdarkly/YIC2H8XW-fomhquw/images/__LD_UI_no_test/errors-logs-details.png?fit=max&auto=format&n=YIC2H8XW-fomhquw&q=85&s=31fdae3e6e8722060fb7ecab132728b1" alt="A detailed view of a log entry." width="1456" height="704" data-path="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](/docs/sdk/observability). The functionality is available through plugins to the LaunchDarkly JavaScript SDK.

To view logs for your application, open the **Telemetry** section and navigate to the **Logs** list.

## Search

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

### Search attributes

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

<table>
  <thead>
    <tr>
      <th>Category</th>
      <th>Attribute</th>
      <th>Description</th>
      <th>Example</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Feature flag</td>
      <td>`feature_flag`</td>
      <td> 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`.</td>
      <td>`true`</td>
    </tr>

    <tr>
      <td>Log properties</td>
      <td>`code.filepath`</td>
      <td>File path emitting the log.</td>
      <td>`/build/backend/worker/worker.go`</td>
    </tr>

    <tr>
      <td />

      <td>`code.function`</td>
      <td>Function emitting the log.</td>
      <td>`github.com/acme-org/acme/backend/worker.(*Worker).Start.func3`</td>
    </tr>

    <tr>
      <td />

      <td>`code.lineno`</td>
      <td>Line number of the file where the log was emitted.</td>
      <td>`20`</td>
    </tr>

    <tr>
      <td />

      <td>`level`</td>
      <td>The log level.</td>
      <td>`info`</td>
    </tr>

    <tr>
      <td />

      <td>`message`</td>
      <td>The log message.</td>
      <td>`public-graph graphql request failed`</td>
    </tr>

    <tr>
      <td />

      <td>`span_id`</td>
      <td>Span ID that contains this log.</td>
      <td>`528a54addf6f91cc`</td>
    </tr>

    <tr>
      <td />

      <td>`trace_id`</td>
      <td>Trace ID that contains this log.</td>
      <td>`7654ff38c4631d5a51b26f7e637eea3c`</td>
    </tr>

    <tr>
      <td>Service and application</td>
      <td>`environment`</td>
      <td>The environment key, based on the SDK credentials used in the [observability SDKs](/docs/sdk/observability).</td>
      <td>`production`</td>
    </tr>

    <tr>
      <td />

      <td>`host.name`</td>
      <td>The hostname.</td>
      <td>`ip-172-31-5-211.us-east-2.compute.internal`</td>
    </tr>

    <tr>
      <td />

      <td>`os.description`</td>
      <td>Description of the operating system.</td>
      <td>`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)`</td>
    </tr>

    <tr>
      <td />

      <td>`os.type`</td>
      <td>Type of operating system.</td>
      <td>`linux`</td>
    </tr>

    <tr>
      <td />

      <td>`secure_session_id`</td>
      <td>Session ID that contains the log.</td>
      <td>`wh1jcuN5F9G6Ra5CKeCjdIk6Rbyd`</td>
    </tr>

    <tr>
      <td />

      <td>`service_name`</td>
      <td>Name of the service specified in the SDK plugin. To learn more, read [Versioning sessions and errors](/docs/sdk/features/observability-config-client-side#versioning-sessions-and-errors).</td>
      <td>`private-graph`</td>
    </tr>

    <tr>
      <td />

      <td>`service_version`</td>
      <td>Version of the service specified in the observability SDK plugin. To learn more, read [Versioning sessions and errors](/docs/sdk/features/observability-config-client-side#versioning-sessions-and-errors).</td>
      <td>`e1845285cb360410aee05c61dd0cc57f85afe6da`</td>
    </tr>

    <tr>
      <td />

      <td>`source`</td>
      <td>General origin of the log.</td>
      <td>`backend`</td>
    </tr>
  </tbody>
</table>
