License Type | SaaS & On-Premise |
Agent Mode | Assess & Protect |
Main Product Category | Python Agent |
Sub Category | Troubleshooting |
Objective
In rare scenarios, bad instrumentation causes a web server process to crash or a specific page to error out. If you ever encounter a crash or error caused by Contrast, please report the error via the Submit a Request link at the bottom of this page.
If possible, follow the steps below to gather agent logs; this additional information is vital to reproducing and fixing these types of bugs.
Process
By default, Python agent logs are written to the root of the application directory.
- contrast-agent.log
- security.log
You can ask Contrast to log verbose information by doing one of the following.
- contrast_security.yaml file:
agent:
logger:
path: debug_contrast_agent.log
level: TRACE
- Environment Variables:
CONTRAST__AGENT__LOGGER__PATH=/path/to/debug_contrast_agent.log
CONTRAST__AGENT__LOGGER__LEVEL=TRACE
If your application is running in an SaaS/CaaS environment where the logs are not easily accessible, logging can be sent to STDOUT instead by one of the following methods:
- contrast_security.yaml file:
agent:
logger:
path: /dev/stdout
level: TRACE
- Environment Variables:
CONTRAST__AGENT__LOGGER__LEVEL=TRACE
CONTRAST__AGENT__LOGGER__PATH=/dev/stdout
These options will put Contrast into debug mode and log all output to the log file specified as the system property value. It will also prevent the log from rolling over into multiple files. The log file will start with some messages that look similar to this:
These verbose logs will allow our support team to diagnose any issues you may encounter. To contact the Contrast Support Team, please submit a ticket to our online support portal.