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 capturing starts not immediatelly #1422

Open
Bardiamist opened this issue Jan 25, 2024 · 0 comments
Open

console.log capturing starts not immediatelly #1422

Bardiamist opened this issue Jan 25, 2024 · 0 comments

Comments

@Bardiamist
Copy link

console.log capturing starts not immediatelly when no problems with Reactotron.log

In the next example console log 1 will not be printed in the Reactotron app when no problems with reactotron log 1.

Reactotron.configure({
  name: 'app',
})
  .useReactNative()
  .connect();

console.log('console log 1');
Reactotron.log('reactotron log 1');

setTimeout(() => {
  console.log('console log 2');
  Reactotron.log('reactotron log 2');
}, 1);

Repro here if need: https://github.com/Bardiamist/diff/tree/reactotron

Previously I used:

console.log = (...args) => {
  console.log(...args);
  Reactotron.log?.(...args);
};

Now it leads to double logs. Maybe you need to implement some override like this.

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

1 participant