Skip to content

pitchfork logs

  • Usage: pitchfork logs [FLAGS] [ID]…
  • Aliases: l
  • Effect: read-only

Displays logs for daemon(s)

Shows logs from managed daemons. Logs are stored in the pitchfork logs directory and include timestamps for filtering.

Examples:

pitchfork logs api              Show all logs for 'api' (paged if needed)
pitchfork logs api worker       Show logs for multiple daemons
pitchfork logs                  Show logs for all daemons
pitchfork logs api -n 50        Show last 50 lines
pitchfork logs api --follow     Follow logs in real-time
pitchfork logs api --since '2024-01-15 10:00:00'
                                Show logs since a specific time (forward)
pitchfork logs api --since '10:30:00'
                                Show logs since 10:30:00 today
pitchfork logs api --since '10:30' --until '12:00'
                                Show logs since 10:30:00 until 12:00:00 today
pitchfork logs api --since 5min Show logs from last 5 minutes
pitchfork logs api --raw        Output raw log lines without formatting
pitchfork logs api --raw -n 100 Output last 100 raw log lines
pitchfork logs api --clear      Delete logs for 'api'
pitchfork logs --clear          Delete logs for all daemons

Arguments

  • [ID]… — Show only logs for the specified daemon(s)

Flags

  • -c --clear — Delete logs

    Effect: destructive — may delete or irreversibly overwrite

  • -n <N> — Show last N lines of logs

    With --since/--until, shows the last N matching lines in that time range. Without this option, all logs are shown.

  • -t --tail — Show logs in real-time

    Aliases: -f, --follow

  • -s --since <SINCE> — Show logs from this time

    Supports multiple formats: - Full datetime: "YYYY-MM-DD HH:MM:SS" or "YYYY-MM-DD HH:MM" - Time only: "HH:MM:SS" or "HH:MM" (uses today's date) - Relative time: "5min", "2h", "1d" (e.g., last 5 minutes)

  • -u --until <UNTIL> — Show logs until this time

    Supports multiple formats: - Full datetime: "YYYY-MM-DD HH:MM:SS" or "YYYY-MM-DD HH:MM" - Time only: "HH:MM:SS" or "HH:MM" (uses today's date)

  • --no-pager — Disable pager even in interactive terminal

  • --raw — Output raw log lines without color or formatting

  • --json — Output in JSON format

  • --grep <GREP> — Filter logs by case-insensitive substring (can be repeated)

    Multiple --grep options are combined with OR.

  • --regex <REGEX> — Filter logs by regular expression

  • --case-sensitive — Make --grep matching case-sensitive

  • --level <LEVEL> — Filter by minimum log level (error, warn, info, debug, trace)

    Shows entries at or above the given severity. For example, --level warn shows warn and error. Only effective for daemons with log_format json or logfmt.

  • --field <KEY=VALUE> — Filter by structured field value (KEY=VALUE, can be repeated)

    Extracts the value from fields_json using json_extract($.KEY). Multiple --field options are combined with AND.

  • --jq <EXPR> — Filter log entries with a jq expression

    Each log entry is serialized as a JSON object with fields: timestamp, daemon_id, message, level, msg, logger, fields. Entries for which the expression produces a truthy value are shown.

  • --no-timestamp — Omit timestamps from log output

  • -h --help — Print help

MIT LicenseCopyright © 2026jdx.dev