Skip to content

Cannot disable PyATS log file from being created #269

@assadniang

Description

@assadniang

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions