fatal

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

Logs a message at SentryLogLevel.FATAL level.

Parameters

message

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

args

Arguments to substitute into the message template via toString()


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

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

Example:

Sentry.logger.fatal("Connection pool exhausted on %s", dbHost) {
this["database"] = "users"
this["activeConnections"] = 100
}

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 fatal(message: String, attributes: SentryAttributes.() -> Unit)

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

Example:

Sentry.logger.fatal("Database connection pool exhausted") {
this["database"] = "users"
this["activeConnections"] = 100
}

Parameters

message

The log message

attributes

A lambda with SentryAttributes receiver to set key-value attributes


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

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

Example:

Sentry.logger.fatal {
message("Database connection pool exhausted, shutting down service")
attributes {
this["db.host"] = dbHost
this["db.pool.size"] = poolSize
this["db.active_connections"] = activeConnections
}
}

Parameters

block

A lambda with SentryLogBuilder receiver to configure the log entry