Skip to content

az container attach generate dupliate log if rediected to file #20998

@anasoid

Description

@anasoid

az feedback auto-generates most of the information requested below, as of CLI version 2.31.0

Describe the bug
when redirect command logs with --follow or attach content to a file, i found content duplicate in file, like each second it write all log to file:

az container attach  -g mygoup -n mycontainer > file.txt

To Reproduce
create a container instance 'mycontainer' in a group 'mygoup'

execute command

az container attach  -g mygoup -n mycontainer > file.txt

you will find duplicate content in file.txt of log
Expected behavior
found in in file the same content as i execute command without redirect to file

Environment summary

Linux mint 20.3

{
  "azure-cli": "2.31.0",
  "azure-cli-core": "2.31.0",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {
    "azure-devops": "0.22.0"
  }

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions