forked from mongodb/docs-realm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement feedback: combine tab groups
- Loading branch information
1 parent
a827d54
commit b18b8b9
Showing
6 changed files
with
43 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...includes/api-details/javascript/logger/logging-customize-logger-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
To get started, set a log level: | ||
|
||
.. literalinclude:: /examples/generated/node/v12/logger.test.snippet.set-log-level.ts | ||
:language: javascript | ||
|
||
To set a custom logger with the Node.js SDK, call :js-sdk:`setLogger() | ||
<classes/Realm-1.html#setLogger>`. This method recieves ``level`` and | ||
``message`` arguments from the database logger. You can use these arguments to | ||
define your own logging behavior. | ||
|
||
This sets the logging behavior for all database logging in your application. If | ||
you do not provide a log level, the default value is "info". |
9 changes: 9 additions & 0 deletions
9
source/includes/api-details/kotlin/logger/logging-customize-logger-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,11 @@ | ||
The Kotlin SDK implements the :kotlin-sdk:`RealmLogger | ||
<-realm-logger/index.html>` interface for custom loggers. | ||
|
||
.. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.define-custom-logger.kt | ||
:language: kotlin | ||
|
||
In the Kotlin SDK, use :kotlin-sdk:`RealmLog.add() <-realm-log/add.html>` | ||
to set your custom logger as a logger for your app. | ||
|
||
You can also remove a specific logger or remove all loggers, including the | ||
system logger. |
6 changes: 6 additions & 0 deletions
6
source/includes/api-details/swift/logger/logging-customize-logger-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
In the Swift SDK, initialize an instance of a :swift-sdk:`Logger | ||
<Typealiases.html#/s:10RealmSwift6Loggera>` and define the function to use | ||
for logging. | ||
|
||
.. literalinclude:: /examples/generated/code/start/Logging.snippet.define-custom-logger.swift | ||
:language: swift | ||
|
||
In the Swift SDK, use ``Logger.shared``. After you set the default logger, you | ||
can change the log level during the app lifecycle as needed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters