-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathlog-realm-events.txt
46 lines (33 loc) · 1.22 KB
/
log-realm-events.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
.. meta::
:robots: noindex, nosnippet
.. _java-log-realm-events:
===========================
Log Realm Events - Java SDK
===========================
.. contents:: On this page
:local:
:backlinks: none
:depth: 2
:class: singlecol
The SDK logs events to the Android system log automatically. You can
view these events using :android:`Logcat </studio/debug/am-logcat>`.
.. _java-set-the-client-log-level:
Set the Client Log Level
------------------------
Realm 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 Realm 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->`:
.. tabs-realm-languages::
.. tab::
:tabid: kotlin
.. literalinclude:: /examples/generated/java/sync/SyncDataTest.snippet.set-client-log-level.kt
:language: kotlin
:copyable: false
.. tab::
:tabid: java
.. literalinclude:: /examples/generated/java/sync/SyncDataTest.snippet.set-client-log-level.java
:language: java
:copyable: false
.. include:: /includes/tip-sync-log-levels.rst