pyats icon indicating copy to clipboard operation
pyats copied to clipboard

Cannot disable PyATS log file from being created

Open assadniang opened this issue 4 months ago • 2 comments

Hello, Everytime the pyats connection gets executed, it creates a log file ([device]-cli-[timestamp].log in the script directory.

I cannot seem to disable it

I am running 25.7 version

    # Attempt to connect to the device
    try:
        LOGGER.info(f">>> Connecting to {device_name}...")
        device.connect(log_stdout=False)
        assert device.connected, f"Failed to connect to device {device_name}"
        LOGGER.info(f"Successfully connected to {device_name}\n")
        return device
    
    except (TimeoutError, StateMachineError, ConnectionError) as e:
        LOGGER.error(f"Failed to connect to {device_name}: {e}\n")
        return None

assadniang avatar Sep 19 '25 16:09 assadniang