Logs
Application Logs
Shopware PaaS Native allows you to query and follow logs for a given application environment directly from the CLI.
To view recent runtime logs, run:
sw-paas application logsBy default, the command returns the latest logs from the last 15 minutes. If the CLI cannot infer the target from your current git remote, it will ask you to select the organization, project, and application. You can also pass them explicitly:
sw-paas application logs \
--organization-id <org-id> \
--project-id <project-id> \
--application-id <app-id>After printing the selected logs, the CLI prints a Grafana Explore URL for the same query. Open that URL if you want to continue investigating the result in Grafana.
Follow logs
Use --follow or -f to stream new log lines:
sw-paas application logs --followWhen following logs, the command starts with new lines only. Add --since to include recent history before the live stream begins:
sw-paas application logs --follow --since 30mFilter runtime logs
Use --component to focus on a specific application component:
sw-paas application logs --component storefrontSupported components are:
admincommandcronjobmigrationscheduled-tasksetupstorefrontworkerapp.build
Use --time-range to inspect a local time window for the current day:
sw-paas application logs --time-range 09:00-10:00Use --limit to change the maximum number of returned log lines:
sw-paas application logs --limit 500For advanced filtering, pass a raw LogQL query:
sw-paas application logs --query '{component="storefront"} |= "error"'Output formats
Use --raw to print only log messages:
sw-paas application logs --rawUse --output json for machine-readable output:
sw-paas application logs --output jsonSpecialized log commands
Deployment setup and migration logs are available through sw-paas application deployment logs. The short alias deploy is also supported:
sw-paas application deploy logsIf you know the deployment ID, pass it directly:
sw-paas application deploy logs --deployment-id <deployment-id>Add --follow or -f to stream deployment setup and migration logs.
Cron job run logs are available through the cronjob logs command:
sw-paas application cronjob logsIf you know the run ID, pass it directly:
sw-paas application cronjob logs --run-id <run-id>You can also filter run selection by cron job and control how many history entries are used for selection:
sw-paas application cronjob logs \
--cronjob-id <cronjob-id> \
--history-limit 100The short alias cron is also supported:
sw-paas application cron logsAdd --follow or -f to stream logs for the selected cron job run.
Logs for commands executed in dedicated containers are available through:
sw-paas command logsIf you know the command ID, pass it directly:
sw-paas command logs --command-id <command-id>Add --follow or -f to stream command logs.
These specialized commands also print a Grafana Explore URL at the end so you can open the same log query in Grafana.
Grafana
You can also view and investigate application logs directly in Grafana.
To access Grafana, run the following command:
sw-paas open grafanaThis command will provide you with the Grafana URL, username, and password.
Once logged in to Grafana:
- Open Dashboards.
- Select the Logs dashboard.
- Filter logs by selecting the component you want to inspect.
- Use the search box next to the filter to search within the selected logs.
Log retention
Shopware PaaS Native keeps your latest logs available for review. Logs older than 45 days are automatically removed.