Skip to content

Logging

atlcli includes comprehensive JSONL logging for observability, debugging, and enterprise audit requirements.

Location Path Purpose
Global ~/.atlcli/logs/YYYY-MM-DD.jsonl All operations
Project .atlcli/logs/YYYY-MM-DD.jsonl Project-specific operations

Both locations are written to by default when a .atlcli/ directory exists.

Terminal window
atlcli log list
atlcli log list --limit 50
Terminal window
# Relative time
atlcli log list --since 1h
atlcli log list --since 24h
atlcli log list --since 7d
# Date range
atlcli log list --since "2025-01-01" --until "2025-01-14"
Terminal window
atlcli log list --level error
atlcli log list --level warn
atlcli log list --level info
atlcli log list --level debug
Terminal window
# All API logs
atlcli log list --type api
# Just command invocations
atlcli log list --type cli.command
# Sync events
atlcli log list --type sync
# Auth changes
atlcli log list --type auth
Terminal window
atlcli log list --type api --level error --since 24h

Real-time log streaming:

Terminal window
# Follow new entries
atlcli log tail -f
# Follow with filter
atlcli log tail -f --level error
# Project logs only
atlcli log tail --project

View full details of a specific entry:

Terminal window
# Get ID from log list
atlcli log list --limit 5
# Show full entry
atlcli log show abc123-uuid-here
Terminal window
# Clear logs older than 30 days
atlcli log clear --before 30d --confirm
# Clear only global logs
atlcli log clear --before 7d --global --confirm
# Clear only project logs
atlcli log clear --before 7d --project --confirm
Type Description
cli.command CLI command invocations with args and flags
cli.result Command completion with exit code and duration
api.request Confluence/Jira API requests
api.response API responses with status and duration
sync.event Sync events (pull, push, conflict)
auth.change Authentication changes (login, logout, switch)
error Errors with stack traces and context

Each entry is a JSON object:

{
"id": "5bb8303b-08ce-4c9d-9a2e-657ca2ceaece",
"timestamp": "2025-01-14T12:12:20.722Z",
"level": "info",
"type": "api.request",
"pid": 12345,
"sessionId": "3ea06a39-52b2-4b18-a74b-8d0e6ee02ddf",
"data": {
"requestId": "ada26fed-45b8-42f1-881b-2034f6f9b6bd",
"method": "GET",
"url": "https://company.atlassian.net/wiki/rest/api/content/123"
}
}
Field Description
id Unique entry identifier
sessionId Correlates all logs from one CLI invocation
requestId Correlates API request with its response
pid Process ID
level error, warn, info, debug
type Entry type (see above)
data Type-specific payload

For scripting and analysis:

Terminal window
# Get raw JSON
atlcli log list --json
# Query with jq
atlcli log list --json | jq '.entries[] | select(.data.status >= 400)'
# Count errors by type
atlcli log list --level error --json | jq 'group_by(.type) | map({type: .[0].type, count: length})'

Configure logging in ~/.atlcli/config.json:

{
"logging": {
"level": "info",
"global": true,
"project": true
}
}
Option Values Default Description
level off, error, warn, info, debug info Minimum level to log
global true, false true Write to global log
project true, false true Write to project log
Terminal window
# Single command
atlcli wiki page list --space DEV --no-log
# Globally (in config)
# Set "level": "off"

Sensitive fields are automatically redacted:

Field Redacted As
API tokens [REDACTED]
Passwords [REDACTED]
Authorization headers Basic [REDACTED]

Not redacted (needed for audit):

  • Email addresses
  • Page titles
  • Content (for sync debugging)
Terminal window
# Find failed requests
atlcli log list --type api.response --json | \
jq '.entries[] | select(.data.status >= 400) | {url: .data.url, status: .data.status}'
Terminal window
# Who did what
atlcli log list --type cli.command --since 7d --json | \
jq '.entries[] | "\(.timestamp): \(.data.command) \(.data.args | join(" "))"'
Terminal window
# Slow API calls
atlcli log list --type api.response --json | \
jq '.entries[] | select(.data.duration > 1000) | {url: .data.url, duration: .data.duration}'
Terminal window
# Find response for a request
REQUEST_ID="ada26fed-45b8-42f1-881b-2034f6f9b6bd"
atlcli log list --json | jq ".entries[] | select(.data.requestId == \"$REQUEST_ID\")"
Jira and Confluence are trademarks of Atlassian Corporation Plc. atlcli is not affiliated with, endorsed by, or sponsored by Atlassian.