Język

SearchSpec.Builder.SetSearchSourceLogTag(String) Method

Definition

Sets an optional log tag to indicate the source of this search.

[Android.Runtime.Register("setSearchSourceLogTag", "(Ljava/lang/String;)Landroid/app/appsearch/SearchSpec$Builder;", "", ApiSince=35)]
public Android.App.AppSearch.SearchSpec.Builder SetSearchSourceLogTag(string searchSourceLogTag);
[<Android.Runtime.Register("setSearchSourceLogTag", "(Ljava/lang/String;)Landroid/app/appsearch/SearchSpec$Builder;", "", ApiSince=35)>]
member this.SetSearchSourceLogTag : string -> Android.App.AppSearch.SearchSpec.Builder

Parameters

searchSourceLogTag
String

A String to indicate the source caller of this search. It is used to label the search statsd for performance analysis. It is not the tag we are using in Log. The length of the teg should between 1 and 100. This value cannot be null.

Returns

Attributes

Remarks

Sets an optional log tag to indicate the source of this search.

Some AppSearch implementations may log a hash of this tag using statsd. This tag may be used for tracing performance issues and crashes to a component of an app.

Call this method and give a unique value if you want to distinguish this search scenario with other search scenarios during performance analysis.

Under no circumstances will AppSearch log the raw String value using statsd, but it will be provided as-is to custom AppSearchLogger implementations you have registered in your app.

Android reference for android.app.appsearch.SearchSpec.Builder.setSearchSourceLogTag.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to