Avocado logging system¶
This section describes basic of the logging system used in Avocado. For more detailed information about avocado logging system, please go to Advanced logging capabilities.
Tweaking the UI¶
Avocado uses Python’s logging system to produce UI and to store test’s output. The system is quite flexible and allows you to tweak the output to your needs either by built-in stream sets, or directly by using the stream name.
To tweak them you can use:
$ avocado --show STREAM[:LEVEL][,STREAM[:LEVEL][,...]
Built-in streams with description (followed by list of associated Python streams) are listed below:
|app:||The text based UI (avocado.app)|
|test:||Output of the executed tests (avocado.test, “”)|
|job:||Avocado job related logs (avocado.job)|
|early:||Early logging before the logging system is set. It includes the test output and lots of output produced by used libraries. (“”, avocado.test)|
Additionally you can specify “all” or “none” to enable/disable all of pre-defined streams and you can also supply custom Python logging streams and they will be passed to the standard output.
Messages with importance greater or equal WARN in logging stream “avocado.app” are always enabled and they go to the standard error output.
Storing custom logs¶
When you run a test, you can also store custom logging streams into the results directory by running:
$ avocado run --store-logging-stream STREAM[:LEVEL][,STREAM[:LEVEL][,...]
This will produce
$STREAM.$LEVEL files per each (unique) entry in two places.
One in each test result directory where the stream is separated by test and one in
job log directory where the stream will be gathered from all tests into one place.
This might be useful when you don’t use parallel run and you want to have logs
from all tests in one place.
You have to specify separated logging streams. You can’t use the built-in streams in this function.
Avocado log files¶
Avocado use three main files for logging information on different levels.
All of them are stored in
|job.log:||Logs related to job run under avocado.job namespace.|
|full.log:||All generated logs in one job run. It contains all logs from avocado internal to logs from all tests. If you run your tests in parallel the logs might be overlap since the logs are not sorted and they are stored at the time when they have been created.|
|debug.log:||Logs generated by one specific test and they are separated from other
tests logs. Logs are stored in