Skip to content

Commit

Permalink
Adjust other loggers tab set
Browse files Browse the repository at this point in the history
  • Loading branch information
krollins-mdb committed Jun 17, 2024
1 parent 80d3246 commit cc50829
Showing 1 changed file with 36 additions and 37 deletions.
73 changes: 36 additions & 37 deletions source/sdk/test-and-debug/log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,40 +160,39 @@ Other Loggers

.. tabs-drivers::

tabs:
- id: cpp
content: |

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

- id: java
content: |

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>`.

To access newer logging features, use the Kotlin SDK.

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->`:

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

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

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>`.

To access newer logging features, use the Kotlin SDK.

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->`:

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

0 comments on commit cc50829

Please sign in to comment.