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

e2e: log to a file instead of stdout #1607

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

raghavendra-talur
Copy link
Member

@raghavendra-talur raghavendra-talur commented Oct 25, 2024

This makes the test result output easier to read.

@@ -23,12 +23,19 @@ func TestMain(m *testing.M) {

flag.Parse()

logFile, err := os.Create("ramentest.log")
Copy link
Member

Choose a reason for hiding this comment

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

"e2e.log"?

I'm not sure this should be the default. Logging to stdout is very easy to use and our log is not very large.

Maybe add --logfile option?

./run.sh -logfile e2e.log

Copy link
Member

Choose a reason for hiding this comment

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

We can also always log to file regardless of stdout/stderr. This makes it easier to use the log after running other commands with lot of output.

If we always log to file, maybe we can use much less detailed log to stderr, maybe only the normal test output.

I also want to always keep drenv log in standard location to avoid the issue of not having logs to debug issues like this:
https://cloud-native.slack.com/archives/C043N6ZFV9S/p1732122420443799

Signed-off-by: Raghavendra Talur <[email protected]>
@nirs nirs mentioned this pull request Dec 12, 2024
5 tasks
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

Successfully merging this pull request may close these issues.

2 participants