From 8622eeb1c412a9e53e540c629e1271cb257b0564 Mon Sep 17 00:00:00 2001 From: krollins-mdb Date: Thu, 6 Jun 2024 11:56:19 -0400 Subject: [PATCH] Minor edits --- .../logging-customize-logger-description.rst | 2 ++ .../logging-customize-logger-description-2.rst | 7 +++++++ .../logging-customize-logger-description.rst | 8 +------- .../logging-set-change-level-description.rst | 14 ++------------ .../logger/logging-set-custom-logger-example-2.rst | 4 ++-- .../logger/logging-set-custom-logger-example.rst | 4 ++-- source/sdk/test-and-debug/log.txt | 9 ++------- 7 files changed, 18 insertions(+), 30 deletions(-) diff --git a/source/includes/api-details/dart/logger/logging-customize-logger-description.rst b/source/includes/api-details/dart/logger/logging-customize-logger-description.rst index 1a2f0cbc97..4c0552c5e3 100644 --- a/source/includes/api-details/dart/logger/logging-customize-logger-description.rst +++ b/source/includes/api-details/dart/logger/logging-customize-logger-description.rst @@ -1,2 +1,4 @@ The Flutter SDK logger conforms to the `Dart Logger class `__. + +To get started, set a log level: diff --git a/source/includes/api-details/javascript/logger/logging-customize-logger-description-2.rst b/source/includes/api-details/javascript/logger/logging-customize-logger-description-2.rst index e69de29bb2..6fb1fc7416 100644 --- a/source/includes/api-details/javascript/logger/logging-customize-logger-description-2.rst +++ b/source/includes/api-details/javascript/logger/logging-customize-logger-description-2.rst @@ -0,0 +1,7 @@ +To set a custom logger with the Node.js SDK, call :js-sdk:`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". diff --git a/source/includes/api-details/javascript/logger/logging-customize-logger-description.rst b/source/includes/api-details/javascript/logger/logging-customize-logger-description.rst index 6fb1fc7416..a60a16983b 100644 --- a/source/includes/api-details/javascript/logger/logging-customize-logger-description.rst +++ b/source/includes/api-details/javascript/logger/logging-customize-logger-description.rst @@ -1,7 +1 @@ -To set a custom logger with the Node.js SDK, call :js-sdk:`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". +To get started, set a log level: diff --git a/source/includes/api-details/javascript/logger/logging-set-change-level-description.rst b/source/includes/api-details/javascript/logger/logging-set-change-level-description.rst index 4f4942fb01..2d97486cb5 100644 --- a/source/includes/api-details/javascript/logger/logging-set-change-level-description.rst +++ b/source/includes/api-details/javascript/logger/logging-set-change-level-description.rst @@ -1,16 +1,6 @@ To set the level of detail reported by the Node.js SDK pass a valid level to -:js-sdk:`Realm.setLogLevel() `. Valid values -are: - -- "all" -- "trace" -- "debug" -- "detail" -- "info" -- "warn" -- "error" -- "fatal" -- "off" +:js-sdk:`Realm.setLogLevel() `. Refer to +:js-sdk:`LogLevel ` for all valid values. .. note:: Performance and console.log() diff --git a/source/includes/sdk-examples/logger/logging-set-custom-logger-example-2.rst b/source/includes/sdk-examples/logger/logging-set-custom-logger-example-2.rst index 6ea387cd89..726dd9301e 100644 --- a/source/includes/sdk-examples/logger/logging-set-custom-logger-example-2.rst +++ b/source/includes/sdk-examples/logger/logging-set-custom-logger-example-2.rst @@ -23,7 +23,7 @@ - id: javascript content: | - .. literalinclude:: /examples/MissingPlaceholders/example.js + .. literalinclude:: /examples/generated/node/v12/logger.test.snippet.set-custom-logger.js :language: javascript :copyable: false @@ -42,6 +42,6 @@ - id: typescript content: | - .. literalinclude:: /examples/MissingPlaceholders/example.ts + .. literalinclude:: /examples/generated/node/v12/logger.test.snippet.set-custom-logger.ts :language: typescript :copyable: false diff --git a/source/includes/sdk-examples/logger/logging-set-custom-logger-example.rst b/source/includes/sdk-examples/logger/logging-set-custom-logger-example.rst index 166e21c57c..5288636f10 100644 --- a/source/includes/sdk-examples/logger/logging-set-custom-logger-example.rst +++ b/source/includes/sdk-examples/logger/logging-set-custom-logger-example.rst @@ -22,7 +22,7 @@ - id: javascript content: | - .. literalinclude:: /examples/generated/node/v12/logger.test.snippet.set-custom-logger.js + .. literalinclude:: /examples/generated/node/v12/logger.test.snippet.set-log-level.ts :language: javascript - id: kotlin @@ -40,5 +40,5 @@ - id: typescript content: | - .. literalinclude:: /examples/generated/node/v12/logger.test.snippet.set-custom-logger.ts + .. literalinclude:: /examples/generated/node/v12/logger.test.snippet.set-log-level.ts :language: typescript diff --git a/source/sdk/test-and-debug/log.txt b/source/sdk/test-and-debug/log.txt index 8e7a549c7b..c431b818f5 100644 --- a/source/sdk/test-and-debug/log.txt +++ b/source/sdk/test-and-debug/log.txt @@ -30,6 +30,7 @@ amounts of data depending on your development needs. You can specify different log levels or custom loggers. .. warning:: Java SDK Logging Support + The Java SDK does not support the same logging API as the other SDKs. Instead, it uses a deprecated sync logger. Refer to the Java SDK: Deprecated Sync Logger section on this page for more details. @@ -143,8 +144,7 @@ debugging. .. include:: /includes/sdk-examples/logger/logging-set-custom-logger-example.rst -After setting a custom logger, you should also initialize the logger and and set -it as the default logger for your database. +After setting a custom logger, you may need to initialize the logger. .. tabs-drivers:: @@ -201,11 +201,6 @@ You can turn off logging by setting the log level: .. include:: /includes/sdk-examples/logger/logging-turn-off-example.rst -.. note:: Flutter SDK Isolates and Logging Behavior - - For the Flutter SDK, if you turn off logging from the first isolate, this - stops the default printing logger. - Java SDK: Deprecated Sync Logger --------------------------------