Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UC 32: As a developer, I want to get the logs of the component I'm working on #177

Closed
jorgemoralespou opened this issue Mar 5, 2018 · 12 comments
Assignees
Labels
kind/epic An issue categorized as a high-level Epic. Needs to be scoped and broken down in 1+ stories/tasks priority/Medium Nice to have issue. Getting it done before priority changes would be great.
Milestone

Comments

@jorgemoralespou
Copy link
Contributor

TBD

@kadel
Copy link
Member

kadel commented Mar 7, 2018

it would be nice to have it for MVP at least as oc command alias.

@kadel kadel added this to the Milestone-MVP milestone Mar 7, 2018
@kadel kadel added the kind/epic An issue categorized as a high-level Epic. Needs to be scoped and broken down in 1+ stories/tasks label Mar 7, 2018
@cdrage
Copy link
Member

cdrage commented Mar 28, 2018

@kadel @jorgemoralespou

I'll work on this.

Do we want both BuildConfig and DeploymentConfig logs (I'm assuming so).

@cdrage cdrage self-assigned this Mar 28, 2018
@kadel
Copy link
Member

kadel commented Mar 29, 2018

@cdrage This needs to be broken into smaller well-defined tasks before we start working on it.
Feel free to do it ;-)

We can start with DeploymentConfigs logs. We are already showing BuildConfig logs when a build is started.

@cdrage
Copy link
Member

cdrage commented Apr 3, 2018

@kadel Okay, I'll begin digging through code in order to get the logs from via a library (specifically DeploymentConfig!)

@kadel
Copy link
Member

kadel commented Apr 4, 2018

There are a few stuff that I think is more important than this. We should fix several painful bugs first.

@cdrage cdrage added the priority/Medium Nice to have issue. Getting it done before priority changes would be great. label Apr 4, 2018
@cdrage
Copy link
Member

cdrage commented Apr 24, 2018

@kadel Going over how to implement this.

First off, we will simply alias to oc for this, until we convert it to it's API counterpart.

What do you think of this?

odo log --help

Show logs of your component.

Usage:
  odo log [component_name] [flags]

Examples:
  # Get DeploymentConfig and BuildConfig logs for component nodejs (default)
  odo log nodejs

  # Retrieve all logs
  odo log nodejs --all

  # Retrieve only pods and buildconfig
  odo log pods,bc nodejs

Flags:
      --all   Retrieve all associated logs
  -h, --help            help for log


Global Flags:
  -v, --verbose   Verbose output

Implementing this would be straight-forward, for example: odo log pods,bc nodejs would translate to: oc get pods,bc nodejs.

@kadel
Copy link
Member

kadel commented Apr 25, 2018

odo users shouldn't be exposed to concepts like pods, or buildconfigs.

It should be just odo log [component name] if no component name is provided that it would assume current component.

What does --all do?
Will this stream logs or just get all the logs of the component from when it was starting to the time the command is run?

@cdrage
Copy link
Member

cdrage commented Apr 25, 2018

@kadel --all would get all the logs deployed by that component.

Streaming could be an option too 👍

@kadel
Copy link
Member

kadel commented Apr 25, 2018

Still a bit confused about what --all means. What will be the difference in what i see when I run odo log vs odo log --all ?

@cdrage
Copy link
Member

cdrage commented Apr 25, 2018

@kadel odo log will get buildconfig + deploymentconfig, --all would also retrieve Pod logs. Or should we not include Pod logs since it's using the built-in image builder?

@kadel
Copy link
Member

kadel commented Apr 25, 2018

technically only pods have logs ;-)

But I don't think we need to show build logs, as they are always displayed when user triggers build via odo push or odo watch. I think that odo log should be only about application log.

@kadel
Copy link
Member

kadel commented May 22, 2018

commmand odo log [component_name] was added in PR #429

Right now it just dumps all component logs to stdout.

I've created issue #465 to add streaming.

I'm closing this as the basic functionality is done.

@kadel kadel closed this as completed May 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/epic An issue categorized as a high-level Epic. Needs to be scoped and broken down in 1+ stories/tasks priority/Medium Nice to have issue. Getting it done before priority changes would be great.
Projects
None yet
Development

No branches or pull requests

3 participants