-
Notifications
You must be signed in to change notification settings - Fork 23
Wexpect logging
Wexpect has a debug logging feature, which is disabled by default. The logs contain useful information about starting and communicating with the console-reader process, which is useful for debugging an issue. Wexpect uses python's built-in logging feature.
To turn on the logging, set the WEXPECT_LOGGER_LEVEL
environment variable to one of the following: SPAM
, DEBUG
, INFO
, WARNING
, ERROR
. I use DEBUG
for testing the start of the wexpect and INFO
for longer tests. To set the DEBUG
level use the following command:
set WEXPECT_LOGGER_LEVEL=DEBUG
Wexpect will generate two logfiles: one for the host process, and another for the console-reader process. The log files will be generated into .wlog
subdirectory by default, and will be named based on the process PID.
To give a custom name, use the WEXPECT_LOGGER_FILENAME
environment variable. (not recommended.)