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

Log output as xk6 extension #1939

Open
ivanape opened this issue Mar 31, 2021 · 3 comments
Open

Log output as xk6 extension #1939

ivanape opened this issue Mar 31, 2021 · 3 comments

Comments

@ivanape
Copy link

ivanape commented Mar 31, 2021

I was reading about xk6 extension and this amazing way to provide new features to k6.

I have reviewed the code for https://github.com/li-zhixin/xk6-influxdbv2 and I was wondering if there is a similar options to extend the log support.

In fact, yesterday I have sent the PR (#1938) to extend the log support for k6, but I think I would be nice to add this feature with a xk6 extension.

Checking the k6 code in https://github.com/k6io/k6/tree/master/log, I have not seen any option to extend the logger support.

So, my questions are... could we add new loggers support using xk6? If not, there is a plan to provide this support?

Thank you!

Iván

@na--
Copy link
Member

na-- commented Mar 31, 2021

Ah, sorry, I didn't realize this issue was opened until after I answered to you in the PR (#1938 (comment)) 😅

We'll discuss this internally, but yes, we're more likely to support extensions for log outputs than we're likely to merge built-in ones for log outputs that aren't very common. I don't see a big reason not to support log extensions, so it's likely going to happen at some point.

@ivanape
Copy link
Author

ivanape commented Mar 31, 2021

Thank you @na--!

Please, let me know if I can help to support this requirement.

@na--
Copy link
Member

na-- commented Mar 31, 2021

We discussed this a bit internally and decided that we'd like to have log output extensions, eventually. It's not a priority and we probably won't work on it ourselves for the next few versions, but we might accept a PR with the required refactoring and functions to support log output extensions.

Also, before we support log output extensions, we should switch the current logging library we use, github.com/sirupsen/logrus, to something else, since it's in maintenance mode and since it's more than a bit inconvenient to integrate with it. We might switch to github.com/uber-go/zap (#216) or to some other structured logging library, we need to do some research. We'd also accept a PR for that, if anyone is interested in working on it 😅

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