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

console.log in the init context doesn't respect --console-output #1131

Open
mstoykov opened this issue Aug 29, 2019 · 4 comments
Open

console.log in the init context doesn't respect --console-output #1131

mstoykov opened this issue Aug 29, 2019 · 4 comments

Comments

@mstoykov
Copy link
Contributor

After #982 the console will be usable inside the init context, closing #951.

Unfortunately because of many shortcomings in the design respecting --console-output turned out to require a quite a big refactoring to make it work which is why it's currently not working.

@na--
Copy link
Member

na-- commented Aug 29, 2019

I suspect this, along with #889, would be much cleaner to fix after #1007 is merged. There are quite a few things that are cleaned up and refactored there that would hopefully make fixing this easier.

@na--
Copy link
Member

na-- commented Mar 26, 2020

I think we actually need to make a breaking change here 😞 I don't think you should be able to configure consoleOutput from the exported script options, this should be a global option for k6 run only, or a runtime option. This will also fix the issue with it not being available in the init context

@na--
Copy link
Member

na-- commented Mar 26, 2020

Actually, it's not going to be a breaking change, because of the json:"-" tag in https://github.com/loadimpact/k6/blob/8507e1d341723e956604b17a58a4485cb2db177e/lib/options.go#L287

So, this should be simple and painless to fix, I think.

@mstoykov
Copy link
Contributor Author

I remember I did actually test that you can't actually redirect from the script ... you can test again - maybe something broke :D
#833 (comment)

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

No branches or pull requests

2 participants