newSession

open fun newSession(@NonNull context: Context, @NonNull key: String, @Nullable name: String): LogSession

Creates new logger session. Must be created before appending log entries. If the nRF Logger application is not installed the method will return null.

Return

The LogSession that can be used to append log entries or nullif nRF Logger is not installed. The null value can be next passed to logging methods.

Parameters

context

the context (activity, service or application).

key

the session key, which is used to group sessions.

name

the human-readable session name.


open fun newSession(@NonNull context: Context, @Nullable profile: String, @NonNull key: String, @Nullable name: String): LogSession

Creates new logger session. Must be created before appending log entries. If the nRF Logger application is not installed the method will return null.

Return

The LogSession that can be used to append log entries or nullif nRF Logger is not installed. The null value can be next passed to logging methods.

Parameters

context

the context (activity, service or application).

profile

application profile which will be concatenated to the application name.

key

the session key, which is used to group sessions.

name

the human-readable session name.