Skip to content

Debugging

Debugging allows you to see what is done internally in Evok, in case you face any troubles.

Single start in debug mode

If you wish to debug a single event and then run Evok in normal mode, you can launch Evok in debug mode. You need to stop the running Evok service first.

Stopping Evok service
sudo systemctl stop evok

Now, you can manually run Evok in debug mode, the output will be printed to the terminal.

Running Evok manually
/opt/evok/bin/evok -d

Setting permanent debug mode

If you need to debug an issue that occurs rarely, you can set Evok to run in debug mode permanently. You have to change logging: level: to DEBUG in /etc/evok/config.yaml. Use text editor of your choice, we recommend using nano (do sudo apt install nano if not present on your system).

Editing configuration file
sudo nano /etc/evok/config.yaml

Find this section:

#   +------------------+
#   | Logging settings |
#   +------------------+
logging:
  level: WARNING
  # ^ Minimum severity of messages to be logged, where minimum is CRITICAL.
  # ^ Options: [CRITICAL, ERROR, WARNING, INFO, DEBUG]

And change the level value to DEBUG:

#   +------------------+
#   | Logging settings |
#   +------------------+
logging:
  level: DEBUG
  # ^ Minimum severity of messages to be logged, where minimum is CRITICAL.
  # ^ Options: [CRITICAL, ERROR, WARNING, INFO, DEBUG]

Now, save via CTRL+X, then press ENTER and exit by CTRL+X. The Evok service has to be restarted now.

Restarting Evok service
sudo systemctl restart evok

Reading the logs

To read the logs from Evok in permanent debug mode, you can use following command. It also prints information about other related services.

Viewing the Evok log
journalctl -e -u evok

You can scroll in the outuput via arrow keys. If you wish to copy the output (no scrolling), use following command:

Copying the Evok log
journalctl --no-pager -u evok -u unipi-one-modbus

This is more practical, as it's almost impossible to copy larger section of the log, when you have to scroll trough it.

Success

You can examine or copy the output.

Determining the version of Evok

You can obtain the version of Evok by executing following command:

/opt/evok/bin/evok -v
Output
v3.0.0