warn
Logs a message at SentryLogLevel.WARN 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.WARN level with inline attributes.
Example:
Sentry.logger.warn("Rate limit reached for endpoint") {
this["endpoint"] = "/api/results/"
this["isEnterprise"] = false
}Parameters
The log message
A lambda with SentryAttributes receiver to set key-value attributes
Logs a message at SentryLogLevel.WARN level with template parameters and inline attributes.
Example:
Sentry.logger.warn("Rate limit at %s%% for endpoint %s", usage, endpoint) {
this["endpoint"] = "/api/results/"
this["isEnterprise"] = false
}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.WARN level using a DSL builder.
Example:
Sentry.logger.warn {
message("API rate limit at %s%% for client %s", usagePercent, clientId)
attributes {
this["rate_limit.current"] = currentRequests
this["rate_limit.max"] = maxRequests
this["rate_limit.reset_at"] = resetTimestamp
}
}Parameters
A lambda with SentryLogBuilder receiver to configure the log entry