info

abstract fun info(message: String, vararg args: Any?)

Logs a message at SentryLogLevel.INFO level.

Parameters

message

The message template (use %s for substitution, %% for literal %)

args

Arguments to substitute into the message template via toString()


abstract fun info(message: String, attributes: SentryAttributes.() -> Unit)

Logs a message at SentryLogLevel.INFO level with inline attributes.

Example:

Sentry.logger.info("User authenticated successfully") {
this["auth.method"] = "oauth2"
this["user.id"] = userId
}

Parameters

message

The log message

attributes

A lambda with SentryAttributes receiver to set key-value attributes


abstract fun info(message: String, vararg args: Any?, attributes: SentryAttributes.() -> Unit)

Logs a message at SentryLogLevel.INFO level with template parameters and inline attributes.

Example:

Sentry.logger.info("User %s authenticated via %s", userId, method) {
this["auth.method"] = "oauth2"
this["user.id"] = userId
}

Parameters

message

The message template (use %s for substitution, %% for literal %)

args

Arguments to substitute into the message template via toString()

attributes

A lambda with SentryAttributes receiver to set key-value attributes


abstract fun info(block: SentryLogBuilder.() -> Unit)

Logs a message at SentryLogLevel.INFO level using a DSL builder.

Example:

Sentry.logger.info {
message("User %s successfully authenticated", user.email)
attributes {
this["auth.method"] = "oauth2"
this["user.id"] = user.id
}
}

Parameters

block

A lambda with SentryLogBuilder receiver to configure the log entry