# Déboguer Weblate

Bugs can behave as application crashes or as various misbehavior.
You are welcome to collect info on any such issue and submit it to the [issue tracker](https://github.com/WeblateOrg/weblate/issues).

## Mode de débogage

Turning on debug mode will make the exceptions show in the web browser. This is useful to
debug issues in the web interface, but not suitable for a production environment
because it has performance consequences and might leak private data.

In a production environment, use [`ADMINS`](https://docs.weblate.org/fr/weblate-2026.10.1/admin/install.md#std-setting-ADMINS) to receive e-mails containing error
reports, or configure error collection using a third-party service.

#### SEE ALSO
* [Désactiver le mode débogage](https://docs.weblate.org/fr/weblate-2026.10.1/admin/install.md#production-debug)
* [Configurer correctement les administrateurs](https://docs.weblate.org/fr/weblate-2026.10.1/admin/install.md#production-admins)
* [Collecting error reports and monitoring performance](https://docs.weblate.org/fr/weblate-2026.10.1/admin/install.md#collecting-errors)

<a id="weblate-logs"></a>

## Logs de Weblate

Weblate can produce detailed logs of what is going on in the background.
In the default configuration it uses syslog and that makes the log appear either in
`/var/log/messages` or `/var/log/syslog` (depending on your syslog
daemon configuration).

The Celery process (see [Tâches en arrière-plan utilisant Celery](https://docs.weblate.org/fr/weblate-2026.10.1/admin/install.md#celery)) usually produces its own logs as well.
The example system-wide setups logs to several files under `/var/log/celery/`.

Docker containers log to their output (as per usual in the Docker world), so
you can look at the logs using `docker compose logs`. You can get more
detailed logs by changing [`WEBLATE_LOGLEVEL`](https://docs.weblate.org/fr/weblate-2026.10.1/admin/install/docker.md#envvar-WEBLATE_LOGLEVEL).

#### SEE ALSO
[Configuration d’exemple](https://docs.weblate.org/fr/weblate-2026.10.1/admin/sample.md#sample-configuration) contient la configuration [`LOGGING`](https://docs.djangoproject.com/fr/stable/ref/settings/#std-setting-LOGGING).

<a id="debug-tasks"></a>

## Les tâches d’arrière plan ne sont pas exécutées

A lot of things are done in the background by Celery workers.
If things like sending out e-mails or component removal does not work,
there might a related issue.

Choses à vérifier dans ce cas :

* Vérifiez que le processus Celery est en cours d’exécution, voir [Tâches en arrière-plan utilisant Celery](https://docs.weblate.org/fr/weblate-2026.10.1/admin/install.md#celery)
* Check the Celery queue status, either in [Interface de gestion](https://docs.weblate.org/fr/weblate-2026.10.1/admin/admin.md#management-interface), or using [`celery_queues`](https://docs.weblate.org/fr/weblate-2026.10.1/admin/management.md#weblate-admin-celery_queues)
* Cherchez les erreurs dans les journaux de Celery (voir [Logs de Weblate](#weblate-logs))

<a id="debug-mails"></a>

## Courriels non reçus de Weblate

You can verify whether outgoing e-mail is working correctly by using the
[`sendtestemail`](https://docs.djangoproject.com/fr/stable/ref/django-admin/#django-admin-sendtestemail) management command (see [Appel des commandes de gestion](https://docs.weblate.org/fr/weblate-2026.10.1/admin/management.md#invoke-manage)
for instructions on how to invoke it in different environments) or by using
[Interface de gestion](https://docs.weblate.org/fr/weblate-2026.10.1/admin/admin.md#management-interface) under the Tools tab.

These send e-mails directly, so this verifies that your SMTP configuration is
correct (see [Configuration des e-mails sortants](https://docs.weblate.org/fr/weblate-2026.10.1/admin/install.md#out-mail)).
Most of the e-mails from Weblate are however sent in the background and there might
be some issues with Celery involved as well, please see [Les tâches d’arrière plan ne sont pas exécutées](#debug-tasks) for debugging that.

## Analyse du plantage des applications

In case the application crashes, it is useful to collect as much info about
the crash as possible.
This can be achieved by using third-party services which can collect such info automatically.
You can find info on how to set this up in [Collecting error reports and monitoring performance](https://docs.weblate.org/fr/weblate-2026.10.1/admin/install.md#collecting-errors).

## Échecs silencieux

Lots of tasks are offloaded to Celery for background processing.
Failures are not shown in the user interface, but appear in the Celery logs.
Configuring [Collecting error reports and monitoring performance](https://docs.weblate.org/fr/weblate-2026.10.1/admin/install.md#collecting-errors) helps you to notice such failures easier.

## Problèmes de performance

In case Weblate performs badly in some scenario, please collect the relevant logs
showing the issue, and anything that might help figuring out where the code
might be improved.

See [Collecting error reports and monitoring performance](https://docs.weblate.org/fr/weblate-2026.10.1/admin/install.md#collecting-errors) for information on setting up Sentry which can
provide useful insights on badly performing operations.

In case the slow performance is linked to the database, you can also enable
logging of all database queries using following configuration after enabling
[`DEBUG`](https://docs.weblate.org/fr/weblate-2026.10.1/admin/install.md#std-setting-DEBUG):

```python
LOGGING["loggers"]["django.db.backends"] = {"handlers": ["console"], "level": "DEBUG"}
```
