Skip to content

Commit

Permalink
Remove "other loggers" tab set
Browse files Browse the repository at this point in the history
  • Loading branch information
krollins-mdb committed Jun 25, 2024
1 parent 7ee8fab commit 9db146d
Showing 1 changed file with 29 additions and 50 deletions.
79 changes: 29 additions & 50 deletions source/sdk/test-and-debug/log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,62 +158,41 @@ You can turn off logging by setting the log level:
Other Loggers
-------------

.. tabs-drivers::

.. tab::
:tabid: cpp-sdk

The C++ SDK uses a sync logger that behaves differently than the rest of
the examples on this page. You can set or change your sync client's log
level to develop or debug your application. You might want to change the
log level to log different amounts of data depending on the app's
environment.

You can set the level of detail reported by the sync client logger to
specify the level of output you want from the sync client. Get
:cpp-sdk:`an instance of an App's sync manager
<structrealm_1_1internal_1_1bridge_1_1sync__manager.html>`,
and pass a :cpp-sdk:`realm::logger::level <structrealm_1_1logger.html>`
to the ``set_log_level()`` member function:

.. literalinclude:: /examples/generated/cpp/quick-start.snippet.set-sync-log-level.cpp
:language: cpp

.. tab::
:tabid: csharp

.. tab::
:tabid: dart
The C++ and Java SDKs have additional Loggers that behave differently.

.. tab::
:tabid: kotlin
C++ SDK
~~~~~~~

.. tab::
:tabid: csharp
The C++ SDK uses a sync logger that behaves differently than the rest of
the examples on this page. You can set or change your sync client's log
level to develop or debug your application. You might want to change the
log level to log different amounts of data depending on the app's
environment.

The Java SDK uses an older Logger that may not behave like the other SDKs.
The SDK logs events to the Android system log automatically. You can
view these events using :android:`Logcat </studio/debug/am-logcat>`.
You can set the level of detail reported by the sync client logger to
specify the level of output you want from the sync client. Get
:cpp-sdk:`an instance of an App's sync manager
<structrealm_1_1internal_1_1bridge_1_1sync__manager.html>`,
and pass a :cpp-sdk:`realm::logger::level <structrealm_1_1logger.html>`
to the ``set_log_level()`` member function:

To access newer logging features, use the Kotlin SDK.
.. literalinclude:: /examples/generated/cpp/quick-start.snippet.set-sync-log-level.cpp
:language: cpp

The Java SDK uses the log levels defined by `Log4J
<https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html>`_.
To configure the log level for database logs in your application, pass a
:java-sdk:`LogLevel <io/realm/log/LogLevel.html>` to
:java-sdk:`RealmLog.setLevel() <io/realm/log/RealmLog.html#setLevel-int->`:
Java SDK
~~~~~~~~

.. literalinclude:: /examples/generated/java/sync/SyncDataTest.snippet.set-client-log-level.java
:language: java
The Java SDK uses an older Logger that may not behave like the other SDKs.
The SDK logs events to the Android system log automatically. You can
view these events using :android:`Logcat </studio/debug/am-logcat>`.

.. tab::
:tabid: javascript
To access newer logging features, use the Kotlin SDK.

.. tab::
:tabid: kotlin

.. tab::
:tabid: swift
The Java SDK uses the log levels defined by `Log4J
<https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html>`_.
To configure the log level for database logs in your application, pass a
:java-sdk:`LogLevel <io/realm/log/LogLevel.html>` to
:java-sdk:`RealmLog.setLevel() <io/realm/log/RealmLog.html#setLevel-int->`:

.. tab::
:tabid: typescript
.. literalinclude:: /examples/generated/java/sync/SyncDataTest.snippet.set-client-log-level.java
:language: java

0 comments on commit 9db146d

Please sign in to comment.