Skip to content

Logging

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

LocationPathPurpose
Global~/.atlcli/logs/YYYY-MM-DD.jsonlAll operations
Project.atlcli/logs/YYYY-MM-DD.jsonlProject-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
TypeDescription
cli.commandCLI command invocations with args and flags
cli.resultCommand completion with exit code and duration
api.requestConfluence/Jira API requests
api.responseAPI responses with status and duration
sync.eventSync events (pull, push, conflict)
auth.changeAuthentication changes (login, logout, switch)
errorErrors 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"
}
}
FieldDescription
idUnique entry identifier
sessionIdCorrelates all logs from one CLI invocation
requestIdCorrelates API request with its response
pidProcess ID
levelerror, warn, info, debug
typeEntry type (see above)
dataType-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
}
}
OptionValuesDefaultDescription
leveloff, error, warn, info, debuginfoMinimum level to log
globaltrue, falsetrueWrite to global log
projecttrue, falsetrueWrite 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:

FieldRedacted As
API tokens[REDACTED]
Passwords[REDACTED]
Authorization headersBasic [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.