Skip to content

Reduce *SSHConnection logging verbosity #20

Description

@comps

Currently, at INFO log level, both *SSHConnections print the full options dict.

atex.connection.ssh.0: connecting: {'LogLevel': 'ERROR', 'StrictHostKeyChecking': 'no', 'UserKnownHostsFile': '/dev/null', 'ConnectionAttempts': 1000, 'ServerAliveCountMax': 4, 'ServerAliveInterval': 30, 'TCPKeepAlive': 'no', 'EscapeChar': 'none', 'ExitOnForwardFailure': 'yes', 'IdentitiesOnly': 'yes', 'GSSAPIAuthentication': 'no', 'RequestTTY': 'no', 'Hostname': '1.2.3.4', 'User': 'root', 'Port': '22', 'IdentityFile': PosixPath('/home/comps/.ssh/id_rsa'), 'Compression': 'yes'}

While this might be useful for DEBUG log level (or maybe not even that), we should likely parse just the user-passed options (not merged with all default ones) and print only that, in some better format.

Maybe like this?

atex.connection.ssh.0: connecting: Hostname=1.2.3.4 Port=22 User=root IdentityFile=/home/comps/.ssh/id_rsa

Any whitespace-less options are printed as key=value, any whitespace-containing options as key="value with spaces".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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