Skip to content

Conversation

@ide
Copy link
Contributor

@ide ide commented Aug 28, 2015

Ex. When console.log or similar is called, this will call
the original method, which can be quite useful.

For example, under iOS, this will log to the Safari console debugger,
which has an expandable UI for inspecting objects, etc., and is also
just useful if you are using that as a REPL.

I don't believe this incurs a meaningful performance penalty unless
the console is open, but it would be easy to stick behind a flag
if that is a problem.

@ide
Copy link
Contributor Author

ide commented Aug 28, 2015

@vjeux this is the console patch we briefly mentioned

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 28, 2015
Copy link
Contributor

Choose a reason for hiding this comment

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

2 spaces please :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

Ex. When `console.log` or similar is called, this will call
the original method, which can be quite useful.

For example, under iOS, this will log to the Safari console debugger,
which has an expandable UI for inspecting objects, etc., and is also
just useful if you are using that as a REPL.

I don't believe this incurs a meaningful performance penalty unless
the console is open, but it would be easy to stick behind a flag
if that is a problem.
@vjeux
Copy link
Contributor

vjeux commented Sep 23, 2015

Thanks. Let me try it out and see how it looks like on Chrome. I'm afraid that it will show the console.log twice.

@vjeux
Copy link
Contributor

vjeux commented Sep 23, 2015

@facebook-github-bot import

@facebook-github-bot
Copy link
Contributor

Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/920634044695466/int_phab to review.

@vjeux
Copy link
Contributor

vjeux commented Sep 23, 2015

@facebook-github-bot shipit

@ide
Copy link
Contributor Author

ide commented Sep 23, 2015

We've been using the Chrome debugger and the logs haven't shown up twice because the polyfill bails out if global.nativeLoggingHook is undefined.

@facebook-github-bot
Copy link
Contributor

Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/920634044695466/int_phab to review.

@ghost ghost closed this in dc7681e Sep 24, 2015
MattFoley pushed a commit to skillz/react-native that referenced this pull request Nov 9, 2015
Summary: Ex. When `console.log` or similar is called, this will call
the original method, which can be quite useful.

For example, under iOS, this will log to the Safari console debugger,
which has an expandable UI for inspecting objects, etc., and is also
just useful if you are using that as a REPL.

I don't believe this incurs a meaningful performance penalty unless
the console is open, but it would be easy to stick behind a flag
if that is a problem.
Closes facebook#2486

Reviewed By: @​svcscm

Differential Revision: D2472470

Pulled By: @vjeux
cpojer pushed a commit to facebook/metro that referenced this pull request Jan 26, 2017
Summary: Ex. When `console.log` or similar is called, this will call
the original method, which can be quite useful.

For example, under iOS, this will log to the Safari console debugger,
which has an expandable UI for inspecting objects, etc., and is also
just useful if you are using that as a REPL.

I don't believe this incurs a meaningful performance penalty unless
the console is open, but it would be easy to stick behind a flag
if that is a problem.
Closes facebook/react-native#2486

Reviewed By: @​svcscm

Differential Revision: D2472470

Pulled By: @vjeux
@ide ide deleted the console-log branch March 9, 2024 01:19
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants