AnalyticsLogger
class AnalyticsLogger<LogProtoT : Any>
kotlin.Any | |
↳ | com.google.android.gms.dtdi.analytics.AnalyticsLogger |
Direct use of AnalyticsLogger
is not supported.
Logs DtdiClientLog
entries.
Summary
Nested classes |
|
---|---|
enum |
Direct use of |
Constants |
|
---|---|
const String |
Direct use of |
Public methods |
|
---|---|
Unit |
log(event: LogProtoT, correlationData: CorrelationData, clientInfo: ClientInfo?) Log a message to this logger's underlying transport. |
Companion functions |
|
---|---|
AnalyticsLogger<T> |
create(context: Context, logCreator: (T) -> ByteArray, loggingConfigurationStrategy: LoggingConfigurationStrategy, loggerTransport: LoggerTransport, userType: AnalyticsLogger.AnalyticsUserType) Creates an AnalyticsLogger by creating a serialized log protos. |
Constants
DTDI_LOG_SOURCE
const val DTDI_LOG_SOURCE: String
Direct use of DTDI_LOG_SOURCE
is not supported.
The log source name for DTDI.
Value: "DTDI"
Public methods
log
fun log(
event: LogProtoT,
correlationData: CorrelationData,
clientInfo: ClientInfo?
): Unit
Log a message to this logger's underlying transport.
Companion functions
create
fun <T : Any> create(
context: Context,
logCreator: (T) -> ByteArray,
loggingConfigurationStrategy: LoggingConfigurationStrategy,
loggerTransport: LoggerTransport,
userType: AnalyticsLogger.AnalyticsUserType
): AnalyticsLogger<T>
Creates an AnalyticsLogger by creating a serialized log protos.
Parameters | |
---|---|
context: Context | The context used for logging. |
logCreator: (T) -> ByteArray | Function that creates a serialized byte array of DtdiClientLog to be merged into the log event. |
loggingConfigurationStrategy: LoggingConfigurationStrategy | Strategy for determining whether or not logging is enabled, which may change depending on the log types. |
loggerTransport: LoggerTransport | Analytics logging transport. |
userType: AnalyticsLogger.AnalyticsUserType | The type of user associated with the logs. |