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

# flox services logs

## NAME

flox-services-logs - show logs of services

## SYNOPSIS

```text theme={null}
flox [<general-options>] services logs
     [-d=<path> | -r=<owner/name>]
     [--follow]
     [-n=<num>]
     [<name>] ...
```

## DESCRIPTION

Display the logs of the specified services.

If no services are specified, then the `--follow` flag is required and
logs from all services will be printed in real time.

One or more service names specified with the `--follow` flag will follow
the logs for the specified services.

If a service name is supplied without the `--follow` flag then all of
the available logs are displayed for that service. If specified with the
`-n` flag then only the most recent `<num>` lines from that service are
displayed.

An error will be returned if a specified service does not exist.

## OPTIONS

`--follow`\
Follow log output for the specified services. Required when no service
names are supplied.

`-n`, `--tail`\
Display only the last `<num>` lines from the logs of the specified
services.

`<name>`\
Which service(s) to display logs for. When omitted logs from all
services will be displayed but the `--follow` flag is required.

### Environment Options

If no environment is specified for an environment command, the
environment in the current directory or the active environment that was
last activated is used.

`-d`, `--dir`\
Path containing a .flox/ directory.

`-r`, `--reference`\
A FloxHub environment, specified in the form `<owner>/<name>`.

`-D`, `--default`\
Use your default environment (`<your-user>/default`). When
unauthenticated in an interactive context, you will be prompted to log
in. In non-interactive contexts (e.g., scripts or CI), this flag will
fail with an error when authentication is missing.

### General Options

`-h`, `--help`\
Prints help information.

The following options can be passed when running any `flox` subcommand
but must be specified *before* the subcommand.

`-v`, `--verbose`\
Increase logging verbosity. Invoke multiple times for increasing detail.

`-q`, `--quiet`\
Silence logs except for errors.

## EXAMPLES

Follow logs for all services:

```console theme={null}
$ flox services logs --follow
service1: hello
service2: hello
...
```

Follow logs for a subset of services:

```console theme={null}
$ flox services logs --follow service1 service3
service1: hello
service3: hello
...
```

Display all available logs for a single service:

```console theme={null}
$ flox services logs myservice
starting...
running...
stopping...
completed
```

## SEE ALSO

[`flox-activate`](/man/flox-activate)
[`flox-services-start`](/man/flox-services-start)
