-
Notifications
You must be signed in to change notification settings - Fork 87
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
Add support for logging #583
Conversation
2d5e79e
to
ab9e7e0
Compare
be6dc51
to
ee31da5
Compare
ee31da5
to
7582f42
Compare
abf144f
to
516ae15
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks okay, but I have some suggestions for making the API nicer. Also, can we add a test for logging to a file as well as a test where the sync log level differs from the logger log level.
Just a reminder to change default /// Instantiates a new [AppConfiguration] with the specified appId.
AppConfiguration(
this.appId, {
Uri? baseUrl,
Directory? baseFilePath,
this.defaultRequestTimeout = const Duration(seconds: 60),
this.localAppName,
this.localAppVersion,
this.metadataEncryptionKey,
this.metadataPersistenceMode = MetadataPersistenceMode.plaintext,
this.logLevel = LogLevel.info,
this.maxConnectionTimeout = const Duration(minutes: 2),
HttpClient? httpClient,
}) : baseUrl = baseUrl ?? Uri.parse('https://realm.mongodb.com'),
baseFilePath = baseFilePath ?? Directory(Configuration.filesPath),
httpClient = httpClient ?? HttpClient(); |
516ae15
to
4d33723
Compare
* Remove logger and logLevel from AppConfiguration. * New RealmLogLevel class define the realm specific levels.
699ddcc
to
b2eecee
Compare
b2eecee
to
53bdbca
Compare
…atic member on Realm class
@@ -40,6 +40,8 @@ | |||
* Support user profile data. ([#570](https://github.com/realm/realm-dart/pull/570)) | |||
* Support flexible synchronization. ([#496](https://github.com/realm/realm-dart/pull/496)) | |||
* Added support for DateTime properties. ([#569](https://github.com/realm/realm-dart/pull/569)) | |||
* Support setting logger on AppConfiguration. ([#583](https://github.com/realm/realm-dart/pull/583)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't appear to be correct anymore now that we have a single logger.
You can set logger to use with Realm like this:
If nothing is specified, the default logger traces info messages or worse to the console.