error
Logs a message at SentryLogLevel.ERROR level.
Parameters
The message template (use %s for substitution, %% for literal %)
Arguments to substitute into the message template via toString()
Logs a message at SentryLogLevel.ERROR level with template parameters and inline attributes.
Example:
Sentry.logger.error("Failed to process order %s: %s", orderId, error) {
this["orderId"] = "order_123"
this["amount"] = 99.99
}Parameters
The message template (use %s for substitution, %% for literal %)
Arguments to substitute into the message template via toString()
A lambda with SentryAttributes receiver to set key-value attributes
Logs a message at SentryLogLevel.ERROR level with inline attributes.
Example:
Sentry.logger.error("Failed to process payment") {
this["orderId"] = "order_123"
this["amount"] = 99.99
}Parameters
The log message
A lambda with SentryAttributes receiver to set key-value attributes
Logs a message at SentryLogLevel.ERROR level using a DSL builder.
Example:
Sentry.logger.error {
message("Failed to process payment for order %s: %s", orderId, error.message)
attributes {
this["order.amount"] = amount
this["payment.provider"] = "stripe"
this["error.code"] = error.code
}
}Parameters
A lambda with SentryLogBuilder receiver to configure the log entry