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

"logger" instead of "console" #77

Closed
wbamberg opened this issue Jun 20, 2017 · 7 comments
Closed

"logger" instead of "console" #77

wbamberg opened this issue Jun 20, 2017 · 7 comments

Comments

@wbamberg
Copy link
Contributor

Looking at https://developer.mozilla.org/en-US/docs/User:schalkneethling:push

The code sample has "logger.log()" not "console.log()". Is there a reason for this? I'd have thought console would be more obvious.

@schalkneethling
Copy link

schalkneethling commented Jun 21, 2017

The code sample has "logger.log()" not "console.log()". Is there a reason for this? I'd have thought console would be more obvious.

I changed it to logger. The reason is that should you try to actually .log, .dir or anything like that when debugging the live editor code, this override swallows it :-/

@wbamberg
Copy link
Contributor Author

Yes, that makes sense. I don't know if you changed the implementation of console, but in the original it was pretty basic!

@wbamberg wbamberg reopened this Jul 5, 2017
@wbamberg
Copy link
Contributor Author

wbamberg commented Jul 5, 2017

I'd like to reopen this. Feedback in our testing in SF was that "logger" was confusing. I think at least we should reconsider whether to use "console".

@schalkneethling
Copy link

@wbamberg Actually, the way I refactored the code, would allow us to do that now. The problem previously was that the variables and function were all exposed to the global object and so, our console was overriding the global console. I will make this change.

@schalkneethling
Copy link

No, I take that back. For it to work with the examples it needs to be exposed to the global object which means we will be overwriting the global console :-/

@schalkneethling
Copy link

Ok, never mind again ;) Turns out there is a way to have the best of both.

@schalkneethling
Copy link

Resolved in #97

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

2 participants