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

[NEW FEATURE] include stderr in logs #48

Closed
iloveitaly opened this issue Sep 10, 2024 · 3 comments
Closed

[NEW FEATURE] include stderr in logs #48

iloveitaly opened this issue Sep 10, 2024 · 3 comments

Comments

@iloveitaly
Copy link

Is your feature request related to a problem? Please describe.
If the container is failing you can't see it from the log view.

Describe the solution you'd like
Include stderr in the log view.

Describe alternatives you've considered
Quit oxker, grab container sha, then use docker logs SHA

Additional context

@mrjackwills
Copy link
Owner

mrjackwills commented Sep 11, 2024

Yeah it should probably do that.

Are you able to point me in the direction of a container/Dockerfile that I can run which will just fail and write to stderr? Would make developing & testing the feature substantially easier.

@vincentmasse
Copy link
Contributor

You can print to stderr with this python script and docker file.

FROM python:latest

COPY print_err.py root/app.py

CMD ["python", "root/app.py"]
import sys


def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)


if __name__ == "__main__":
    print("This print to stdout")
    eprint("This should print to stderr")

@iloveitaly
Copy link
Author

This is done! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants