> For the complete documentation index, see [llms.txt](https://docs.flxbl.io/flxbl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flxbl.io/flxbl/sfp/cli-reference-v50-and-below/server/logs.md).

# Logs

View logs for a tenant's services

* [`sfp server logs`](#sfp-server-logs)

## `sfp server logs`

View logs for a tenant's services

```
USAGE
  $ sfp server logs -t <value> [--json] [-s app|critical-worker|normal-worker|batch-worker] [-f] [--tail <value>]
    [-g <value>...] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] [--passphrase
    <value> [--identity-file <value> --ssh-connection <value>]]

FLAGS
  -f, --follow                      Follow log output in real-time
  -g, --logsgroupsymbol=<value>...  Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                    opening group, and an optional closing group symbol.
  -s, --service=<option>            Specific service to show logs for (app, critical-worker, normal-worker,
                                    batch-worker, caddy, redis)
                                    <options: app|critical-worker|normal-worker|batch-worker>
  -t, --tenant=<value>              (required) Name of the tenant
      --identity-file=<value>       Path to SSH private key file
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --passphrase=<value>          Passphrase for the SSH private key if required
      --ssh-connection=<value>      SSH connection string in the format user@host[:port]
      --tail=<value>                [default: 100] Number of lines to show from the end of logs

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  View logs for a tenant's services

EXAMPLES
  $ sfp server logs --tenant my-app

  $ sfp server logs --tenant my-app --service app

  $ sfp server logs --tenant my-app --service normal-worker --tail 100

  $ sfp server logs --tenant my-app --follow

  $ sfp server logs --tenant my-app --ssh-connection user@remote-host --identity-file ~/.ssh/id_rsa
```

*See code:* [*src/commands/server/logs.ts*](https://source.flxbl.io/flxbl/sfp-pro)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.flxbl.io/flxbl/sfp/cli-reference-v50-and-below/server/logs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
