# Session Logs

Being able to monitor the application's log outputs is crucial for efficient troubleshooting of your applications. The Session Logs function lets you do just that.

1. Navigate to the space containing the instance where you want to view logs.
2. Navigate to the instance containing the application.
3. Make sure you are in the **Current state**.
4. On the sidebar click the Screen button (**Applications**), which shows you the Application list.
5. On the row of the application of interest, click **...** under **Actions**.
6. In the drop-down click **SESSIONS**.
7. The screen shows the sessions for the given application.
8. To review the logs of a specific session, click the **...** menu under **Actions** and click **SEE LOGS**.

{% hint style="info" %}
As a security measure, you are only able to see the logs for a specific application session if:

* You **started** the session

OR

* The application was **run in** [**SHARED MODE**](/features/applications/configuring-applications.md#run-in-shared-mode) for that specific session
  {% endhint %}

This will take you to the Session logs screen. The Application's name and the specific session's ID you are viewing are shown. The log output is shown in a descending order, i.e., the latest logs are shown at the bottom of the output window.

{% hint style="info" %}
Logs are collected in real time but due to processing, they can be a delayed up to a few minutes until visible on the interface. Also, logs can be retrieved only for **the last 7 days.**
{% endhint %}

## Log Interface Controls

1. Containers
   * Allows you to select which application or sidecar (a.k.a. [Add-on](/features/applications/add-ons.md)) you wish to see the logs for
   * [**Main-App**](/features/applications.md) is the application you have configured (e.g. Visual Studio Code, Jupyter Lab etc.)
   * Any **sidecar** configured to run alongside the application for this session (e.g. Redis, MongoDB etc.)
2. Show Timestamp
   * Toggle timestamp visibility in the output
   * Log messages may or may not have a timestamp in the message itself
3. Number of lines
   * Sets the maximum number of lines of logs that is displayed (default = 100 lines of log output)
4. Filter(s)
   * After Timestamp - Set a **timestamp only on or after** which such logs will be shown (default = no timestamp, so show the latest log messages)
   * Log text - Show logs to only those **containing the text specified.** Note that:

     * The filters are applied at different stages:
       * The timestamp and number of lines filters are applied first (i.e. at the time of query) then,
       * The text filters are applied in Nuvolos after the logs are retrieved.

     For example: there are 150 lines of log output for a given application, the last 100 of which are comprised of:

     * 50 lines with the text `warning`
     * 30 lines with empty log messages
     * 20 lines that do not contain the relevant text ("warning")

     With the default filters, before the `warning` text filter is applied, **the last 100 lines** of log output will be shown. When `warning` is typed in the text filter, the text filter is then applied, so the log output displays 50 lines with the relevant text.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nuvolos.com/features/applications/sessions/session-logs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
