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

Support Core logging #2546

Closed
thekevinbrown opened this issue Sep 30, 2019 · 1 comment · Fixed by #5727
Closed

Support Core logging #2546

thekevinbrown opened this issue Sep 30, 2019 · 1 comment · Fixed by #5727
Assignees
Labels
Blocked This issue is blocked by another issue O-Community T-Enhancement

Comments

@thekevinbrown
Copy link

thekevinbrown commented Sep 30, 2019

Goals

Things don't always go as expected. Developers should have a way to enable a sort of trace logging with Realm so they can see what it's doing in a production application. Without logging we have to go through a lot of extra work to narrow down performance issues.

Expected Results

There should be a way to enable logging, either by configuring Realm, or for performance reasons packaging up the logging version as a different NPM dependency.

Actual Results

The only way to debug what Realm is doing is to guess at what might be causing a problem and remove it.

Steps to Reproduce

Have someone that is not familiar with Realm trying to make a repro to demo a bug. It takes a lot longer than it should.

Code Sample

Not relevant

Version of Realm and Tooling

  • Realm JS SDK Version: Any
  • Node or React Native: Any
  • Client OS & Version: Any
  • Which debugger for React Native: None

Note

This issue was originally raised as #2499, I'm splitting it out because multiple separate and unconnected issues were discovered in exploring there.

@bmunkholm bmunkholm added the First-Good-Issue First Good Issue - Relatively easy issue for new contributers label Oct 7, 2019
@sync-by-unito sync-by-unito bot removed the First-Good-Issue First Good Issue - Relatively easy issue for new contributers label Jan 8, 2021
@sync-by-unito sync-by-unito bot added the Blocked This issue is blocked by another issue label Dec 7, 2021
@sync-by-unito sync-by-unito bot changed the title There should be a way to enable Realm logging Support Core logging Jan 25, 2023
@sync-by-unito
Copy link

sync-by-unito bot commented Apr 3, 2023

➤ papafe commented:

Started working on this, agreed with the team to

  • add setLogger and setLogLevel as static methods on Realm
  • deprecate the previous API (logger set only on the sync manager)
  • logLevel to be a union type of string, and use it for both the logger callback and the setting the log level
  • add a new method to the helper to create a logger, and make the previous logger factory creation to use this new method

Planning to finish this at most by the end of next week.

@papafe papafe mentioned this issue Apr 13, 2023
4 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Blocked This issue is blocked by another issue O-Community T-Enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants