pyATS Log is a sub-component of the Cisco pyATS (Python Automated Test System) ecosystem, providing logging format and utilities. It configures the standard Python logging module to output in a Cisco log format, integral for network automation and testing workflows. The library is currently at version 26.3 and follows a frequent, often monthly or bi-monthly, release cadence as part of the broader pyATS framework.
pip install pyats-logVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to obtain a standard Python logger instance, which `pyATS` automatically configures for Cisco log format output. It also shows the use of a specific `pyats.log.utils` helper, `banner`, for improved log readability.
Run pyATS on a supported operating system (Linux or macOS), or within a Linux-based virtual machine or Docker container on Windows.
Be aware of automatic log generation. Manage generated log files through cleanup scripts or direct deletion. For specific cases, consult the latest pyATS documentation or GitHub issues for potential configuration options to reduce logging verbosity or location, though full disabling may not be available.
Upgrade your Python environment to Python 3.10 or a later supported version (e.g., Python 3.11, 3.12, 3.13 as pyATS prepares for their support).
Use `pyats logs view` exclusively for logs produced by pyATS jobs. For parsing general syslog or other formatted text logs, utilize dedicated parsing libraries or custom scripts (e.g., using `Genie` parsers within the pyATS ecosystem if the logs are from Cisco devices).
This is a known behavior of the pyATS framework. There is no direct configuration to completely disable these files. Implement post-execution cleanup scripts to remove unwanted log files or configure your `pyats run job` command to output to a specific, temporary directory that can be cleared.
Ensure `pyats` is installed in your active Python environment using `pip install pyats` (recommended for full functionality) or `pip install pyats-log` if you only need the logging component. Activate the correct virtual environment if one is being used.
Only use `pyats logs view` for log archives created by `pyats run job`. For parsing network device syslog or debug outputs, leverage `Genie` parsers, which are part of the pyATS ecosystem, or write custom Python parsing logic.