Skip to content

Add app logs command for viewing application logs #23

Description

@megamattron

It would be useful to have a CLI command for viewing application logs directly from the terminal, similar to docker service logs.

Proposed feature

A new dokploy app logs command that supports:

  • Fetching recent logs with configurable --tail count
  • Live streaming with --follow (-f)
  • Time-based filtering with --since (e.g. 30m, 1h, 2d, all)
  • Keyword filtering with --search
  • Non-interactive usage via --applicationId, --projectId, --environmentId flags
  • Interactive project/environment/application selection when flags are omitted

Implementation notes

  • Uses the existing /docker-container-logs WebSocket endpoint for log streaming
  • Tries Docker Swarm mode first, falls back to native containers
  • For Dokploy Cloud instances where WebSocket is unavailable, falls back to SSH-based docker service logs

Example usage

$ dokploy app logs                           # interactive selection
$ dokploy app logs -a myAppId -f             # stream logs
$ dokploy app logs -a myAppId --since 1h     # logs from last hour
$ dokploy app logs -a myAppId --search error # filter by keyword

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions