- Home
- Docs
- Installation and configuration
- Installation and configuration
- Docker version
- Enabling debug logging in ONLYOFFICE Docs
Enabling debug logging in ONLYOFFICE Docs
Overview
In certain cases, it is necessary to run ONLYOFFICE Docs in debug mode — for example, to troubleshoot performance issues, inspect logs, or collect information for support.
There are two options to launch the ONLYOFFICE Docs in debug mode.
Option 1. Using the environment variable (Docker only)
If you are managing the ONLYOFFICE Docs container via Docker or Docker Compose, it is preferable to use an environment variable to enable the debug log level:
Docker
Set the environment variable with
docker run
:docker run -i -t -d -p 8080:80 \ -e DS_LOG_LEVEL=DEBUG \ onlyoffice/documentserver-de:latest
Restart the container if it is already running:
docker restart <container>
Logs can be viewed with:
docker logs -f <container>
Docker Compose
Set the environment variable in
docker-compose.yml
when running the container:services: documentserver: image: onlyoffice/documentserver-de:latest container_name: documentserver restart: always environment: - DS_LOG_LEVEL=DEBUG ports: - "8080:80"
Start Docker Compose:
docker-compose up -d
Restart the container if it is already running:
docker-compose restart documentserver
Logs can be viewed with:
docker-compose logs -f documentserver
Option 2. Using the log4js configuration file
To launch the ONLYOFFICE Docs in the debug mode:
Open the log4js configuration file. The path to the file depends on the operating system you use:
- For Windows -
C:\Program Files\ONLYOFFICE\DocumentServer\config\log4js\production.json
- For Linux -
/etc/onlyoffice/documentserver/log4js/production.json
- For Docker -
/etc/onlyoffice/documentserver/log4js/production.json
(within the Docker container)
- For Windows -
Refer to the following code block
{ "categories": { "default": { "appenders": [ "default" ], "level": "WARN" } } }
- Change the
level
value from"WARN"
to"DEBUG"
. - Save the changes in the
production.json
configuration file. Apply the changes executing the following command:
Linux
systemctl restart ds-*
Docker
supervisorctl restart all
Or restart the ONLYOFFICE DocumentServer Proxy service for Windows:
net stop DsProxySvc net start DsProxySvc net stop DsConverterSvc net start DsConverterSvc net stop DsDocServiceSvc net start DsDocServiceSvc
The logs are stored in the following locations (depending on the installation type):
- For Windows -
C:\Program Files\ONLYOFFICE\DocumentServer\Log
- For Linux -
/var/log/onlyoffice/documentserver
- For Docker -
/var/log/onlyoffice/documentserver
(within the Docker container) and/app/onlyoffice/DocumentServer/logs/documentserver
(on the host if you mount the volume)
- For Windows -