# apex list log

Display a list of IDs and general information about debug logs.

## Description for apex list log

Run this command in a project to list the IDs and general information for all debug logs in your default org.

To fetch a specific log from your org, obtain the ID from this command's output, then run the “sf apex log get” command.

## Aliases for apex list log

`force:apex:log:list`

## Flags

| Flag Name (Long) | Flag Name (Short) | Description                                                                                                                                         |
| ---------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--api-version`  | N/A               | **Type:** Value<br><br>Override the api version used for api requests made by this command                                                          |
| `--flags-dir`    | N/A               | **Type:** Value<br><br>Import flag values from a directory.                                                                                         |
| `--json`         | N/A               | **Type:** Boolean<br><br>Format output as json.                                                                                                     |
| `--target-org`   | `-o`              | **Type:** Value<br>**Required**<br><br>Username or alias of the target org. Not required if the `target-org` configuration variable is already set. |

## Examples for apex list log

List the IDs and information about the debug logs in your default org:

```shell
sf apex list log
```

Similar to previous example, but use the org with the specified username:

```shell
sf apex list log --target-org me@my.org
```
