Obtaining Qodana logs: IDE plugin, CLI, Docker, and CI/CD runs
Background
Qodana support may request log files to investigate an analysis problem. The logs are written to the Qodana results directory, in its log subfolder. The main log file is log/idea.log. The steps to reach this folder differ depending on where Qodana runs.
Note: Qodana logs may contain sensitive information, such as file paths, source code fragments, project structure, dependency names, and environment variables. Review the logs before sharing them, and send them only through trusted channels.
Question
How can Qodana logs be obtained for a local run, a JetBrains IDE run, or a CI/CD pipeline?
Answer
Collect the logs using the method that matches the environment, then share the log folder with support.
Jump to the environment:
- JetBrains IDE (Qodana plugin)
- Local run with the Qodana CLI
- Local run with Docker
- GitHub Actions
- Azure Pipelines
- GitLab CI/CD
- CircleCI
- TeamCity
- Bitbucket Cloud
- Jenkins
JetBrains IDE (Qodana plugin)
When Qodana runs through the Qodana plugin inside a JetBrains IDE, collect the diagnostic data from the IDE itself:
- Navigate to Help | Collect Logs and Diagnostic Data.
- Save the produced archive and share it with support.
Local run with the Qodana CLI
Run the following command from the project root to open the results directory:
qodana show -d
The -d (--dir-only) flag opens the results directory instead of serving the HTML report. Share the log folder from that directory.
When the results directory is not overridden with --results-dir (-o), Qodana stores results under a per-project folder in the user cache directory, and the logs are in its log subfolder. The default paths are:
- macOS:
~/Library/Caches/JetBrains/Qodana/<project-id>/results/log - Linux:
~/.cache/JetBrains/Qodana/<project-id>/results/log - Windows:
%LOCALAPPDATA%\JetBrains\Qodana\<project-id>\results\log
Here <project-id> is a folder name that Qodana generates per analyzed project. Running qodana show -d opens this folder directly, so locating it by hand is usually not needed.
Local run with Docker
Mount the local results directory to the /data/results directory of the Qodana image:
docker run \ -v $(pwd):/data/project/ \ -v $(pwd)/.qodana/results/:/data/results \ -e QODANA_TOKEN="<cloud-project-token>" \ jetbrains/qodana-<image>
After the scan completes, the logs are available in $(pwd)/.qodana/results/log/. See Docker image configuration for details.
GitHub Actions
In the .github/workflows file, set upload-result to true in the with section of the Qodana Scan action:
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2026.1
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
with:
upload-result: trueRe-run the job to produce a qodana-report artifact, download it, and open the log directory. See GitHub Actions for details.
Azure Pipelines
In azure-pipelines.yml, set uploadResult to true in the inputs section of the QodanaScan task:
- task: QodanaScan@2026
inputs:
uploadResult: true
env:
QODANA_TOKEN: $(QODANA_TOKEN)Re-run the pipeline to produce a qodana-report artifact, download it, and open the log directory. See Azure Pipelines for details.
GitLab CI/CD
Use the Qodana GitLab CI/CD component with upload-result enabled, and add an after_script that copies the results into the project directory so the log folder is uploaded even when the analysis fails or hangs:
include:
- component: $CI_SERVER_FQDN/qodana/qodana/qodana-gitlab-ci@v2026.1
inputs:
upload-result: true
qodana:
variables:
RUNNER_SCRIPT_TIMEOUT: 50m # a few minutes below the job timeout
after_script:
- mkdir -p .qodana/results
- cp -a "${CI_BUILDS_DIR:-/builds}/.qodana/results/." .qodana/results/ 2/dev/null || true
artifacts:
paths:
- .qodana/results/
expose_as: 'Qodana report'
when: alwaysRun the job to produce a "Qodana report" artifact, download it, and open the log folder. See GitLab CI/CD for details.
CircleCI
The CircleCI Qodana orb uploads the results directory (including the log folder) as a build artifact. By default the results directory is /tmp/qodana/results and the artifact is named qodana-report, controlled by the results-dir and artifact-name parameters of the scan command:
orbs:
qodana: jetbrains/qodana@<version>
workflows:
main:
jobs:
- qodana/scanAfter the job finishes, open the build in CircleCI, go to the Artifacts tab, and open the log folder. See CircleCI for details.
TeamCity
Qodana runs in TeamCity through the Qodana build runner, which publishes the analysis results (including the log folder) automatically. No manual artifact configuration is needed.
The runner stores the results as a hidden build artifact under the .teamcity/qodana/ directory. The logs are inside the published results archive, in its Build_Results/log/ folder.
Hidden artifacts are not listed on the Artifacts tab by default. To reach the logs:
- Open the build results page and go to the Artifacts tab.
- Click Show hidden artifacts to reveal the
.teamcitydirectory. - Open the results archive under
.teamcity/qodana/and navigate to theBuild_Results/log/folder. Use Download all (.zip) to download everything at once.
See TeamCity integration and Hidden artifacts for details.
Bitbucket Cloud
Bitbucket Cloud runs Qodana as a Docker image. The --results-dir argument defines the directory that holds the log folder. Add this directory to the artifacts block so it can be downloaded:
image: atlassian/default-image:4
pipelines:
branches:
main:
- step:
name: Qodana
caches:
- qodana
image: jetbrains/qodana-<image>
script:
- export QODANA_TOKEN=$QODANA_TOKEN
- qodana --results-dir=$BITBUCKET_CLONE_DIR/.qodana --report-dir=$BITBUCKET_CLONE_DIR/.qodana/report --cache-dir=~/.qodana/cache
artifacts:
- .qodana/**
definitions:
caches:
qodana: .qodana/cacheThe basic configuration in the documentation archives only .qodana/report. Archiving .qodana/** also captures the .qodana/log folder. After the pipeline runs, download the step artifacts and open the log folder. See Bitbucket Cloud for details.
Jenkins
Jenkins runs Qodana as a Docker image, with the workspace mounted to /data/project. Direct the results into the mounted workspace with --results-dir, then archive that directory:
pipeline {
environment {
QODANA_TOKEN = credentials('qodana-token')
}
agent {
docker {
args '''
-v "${WORKSPACE}":/data/project
--entrypoint=""
'''
image 'jetbrains/qodana-<linter>'
}
}
stages {
stage('Qodana') {
steps {
sh 'qodana --results-dir=/data/project/.qodana/results'
}
}
}
post {
always {
archiveArtifacts artifacts: '.qodana/results/**', allowEmptyArchive: true
}
}
}After the build, open the archived artifacts and open the log folder. See Jenkins for details.
Please sign in to leave a comment.