Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Custom logs with frame object as the 2nd param #55

Closed
zatziky opened this issue Sep 30, 2017 · 6 comments
Closed

Custom logs with frame object as the 2nd param #55

zatziky opened this issue Sep 30, 2017 · 6 comments

Comments

@zatziky
Copy link

zatziky commented Sep 30, 2017

Hi there,

this is a kind of a feature request. I am aware that it's possible to override the logs via client.debug = (log) => ...myLogic. It is cumbersome to do anything with the plain text. You could send the text and, as the 2nd parameter, the frame object. Then we developers can strip headers, shorten some access tokens, etc. ...

At the moment the debug methods accepts a vararg ...args. Every method in src/client.js is using only 1 arg (the message). See the code:

debug(...args) {
        if (this.hasDebug) console.log(...args);
}

I will create a PR in a moment so that you can verify it will make no harm, you'll see.

@zatziky
Copy link
Author

zatziky commented Sep 30, 2017

Here is the promised PR - #56

@zatziky
Copy link
Author

zatziky commented Oct 5, 2017

Hey @JSteunou, what is your opinion?

@JSteunou
Copy link
Owner

JSteunou commented Oct 5, 2017

If I understand well you just need more info in the log like the content of a frame. I could do that, but not the way you did in your PR.

@zatziky
Copy link
Author

zatziky commented Oct 8, 2017

@JSteunou I need to customize the data that is logged and the text is not the best fit. Of course, I don't mind if you do it in a different way.

@JSteunou
Copy link
Owner

JSteunou commented Oct 9, 2017

Could you test #58 and tell me if it matches your need?

@zatziky
Copy link
Author

zatziky commented Oct 9, 2017

@JSteunou Right in the morning I'll check it!

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

No branches or pull requests

2 participants