Skip to content

Conversation

@runcom
Copy link
Member

@runcom runcom commented Apr 11, 2015

Signed-off-by: Antonio Murdaca me@runcom.ninja

@runcom runcom force-pushed the remove-job-logs branch 2 times, most recently from e9aaaf4 to 77b6514 Compare April 11, 2015 21:54
@runcom runcom mentioned this pull request Apr 11, 2015
41 tasks
@runcom runcom force-pushed the remove-job-logs branch 3 times, most recently from 611a19a to 0c18630 Compare April 12, 2015 00:03
@duglin
Copy link
Contributor

duglin commented Apr 12, 2015

LGTM

daemon/logs.go Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is simply config.Stdout == nil && config.Stderr == nil

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You getting container here and inside daemon. Seems like you have no choice without significant refactoring, but it is not consistent with your previous PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actualy I think you can do this with additional config parameter, like muxStreams. Api cares only about w.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LK4D4 how do you suggest to go with this? moving container check inside d.ContainerLogs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already check inside ContainerLogs. I was mostly concerned about c.Config.Tty.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

container.Config.Tty value is passed also in cli code

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if I do the multiplexing inside d.ContainerLogs? would it be ok? I'll just pass a writeFlusher to ContainerLogs then @LK4D4

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it'll allow you to remove double check of d.Get, then okay.

@runcom
Copy link
Member Author

runcom commented Apr 12, 2015

@LK4D4 take a look, I've moved the checks and mux inside d.ContainerLogs (I think something can be further simplified though)

@runcom runcom force-pushed the remove-job-logs branch 2 times, most recently from d23911b to 9d4ee49 Compare April 12, 2015 19:24
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not really needed but I think it makes code more readable from here...

@runcom runcom force-pushed the remove-job-logs branch 2 times, most recently from cc581bd to caa362d Compare April 12, 2015 20:31
daemon/logs.go Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure that version check is not necessary. I blindly copied it from attach, but /logs/ endpoint isn't even exists before "1.6"

Signed-off-by: Antonio Murdaca <me@runcom.ninja>
@LK4D4
Copy link
Contributor

LK4D4 commented Apr 13, 2015

LGTM

LK4D4 added a commit that referenced this pull request Apr 13, 2015
@LK4D4 LK4D4 merged commit bfb487d into moby:master Apr 13, 2015
@runcom runcom deleted the remove-job-logs branch May 8, 2015 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants