### Create a New nRF Logger Session Source: https://github.com/nordicsemiconductor/nrf-logger-api/blob/main/README.md Initializes a new log session with a context, a unique key for grouping, and a display name. This session serves as the container where subsequent log entries will be appended. If the nRF Logger application is not installed on the device, this method will perform no action. ```Java logSession = Logger.newSession(context, key, name); ``` -------------------------------- ### Log Messages to an nRF Logger Session Source: https://github.com/nordicsemiconductor/nrf-logger-api/blob/main/README.md Appends log entries to an existing nRF Logger session with a specified log level (e.g., INFO, ERROR) and message content. It supports both plain text messages and formatted string resources with arguments. If the nRF Logger application is not installed, these methods will do nothing. ```Java Logger.log(logSession, Level.INFO, text); Logger.e(logSession, R.string.error, someArg); ``` -------------------------------- ### Create nRF Logger Session with Profile Name Source: https://github.com/nordicsemiconductor/nrf-logger-api/blob/main/README.md Initializes a new log session, allowing for the creation of multiple folders or categories within the nRF Logger application. The 'profile name' parameter is concatenated with the application name, appearing as a distinct entry in the drop-down menu for better organization. ```Java logSession = Logger.newSession(context, "Profile Name", key, name); ``` -------------------------------- ### Add nRF Logger Timber Integration Dependency to Gradle Source: https://github.com/nordicsemiconductor/nrf-logger-api/blob/main/README.md Adds the nRF Logger Timber integration library as a dependency. This is recommended for projects already using Timber (version 5.0.1 or newer) for streamlined logging integration with nRF Logger. ```Groovy implementation 'no.nordicsemi.android:log-timber:2.5.0' ``` -------------------------------- ### Apply Proguard Rule for nRF Logger Library Source: https://github.com/nordicsemiconductor/nrf-logger-api/blob/main/README.md Specifies a Proguard rule to prevent obfuscation and removal of essential classes from the `no.nordicsemi.android.log` package. This ensures the nRF Logger library functions correctly in a Proguard-enabled build environment. ```Proguard -keep class no.nordicsemi.android.log.** { *; } ``` -------------------------------- ### Configure LocalLogContentProvider in AndroidManifest.xml Source: https://github.com/nordicsemiconductor/nrf-logger-api/blob/main/README.md To utilize the LocalLogContentProvider for local log storage, you must extend this class in your project and declare it within the AndroidManifest.xml file. Setting the 'android:exported' attribute to 'true' is necessary if log events need to be added from threads owned by other applications, such as Bluetooth scanner callbacks, to ensure proper permissions. ```XML ``` -------------------------------- ### Add nRF Logger Library Dependency to Gradle Source: https://github.com/nordicsemiconductor/nrf-logger-api/blob/main/README.md Adds the core nRF Logger API library as a dependency to your Android project's `gradle.build` file. This allows your application to utilize the nRF Logger functionalities for custom logging. ```Groovy implementation 'no.nordicsemi.android:log:2.5.0' ``` -------------------------------- ### Mark nRF Logger Session with a Symbol Source: https://github.com/nordicsemiconductor/nrf-logger-api/blob/main/README.md Applies a visual mark or flag to an nRF Logger session, chosen from a set of predefined symbols (e.g., `Logger.MARK_FLAG_RED`). This feature helps in quickly identifying or categorizing specific sessions within the nRF Logger application. ```Java Logger.setSessionMark(logSession, Logger.MARK_FLAG_RED); ``` -------------------------------- ### Set Description for nRF Logger Session Source: https://github.com/nordicsemiconductor/nrf-logger-api/blob/main/README.md Adds a descriptive comment to an existing nRF Logger session. This comment provides additional context or notes for the log session, which is visible within the nRF Logger application interface. ```Java Logger.setSessionDescription(logSession, "This is a comment"); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.