ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Deployments
    • Cloud
    • Server
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
    • Supported Driver Versions
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Install
Search Ask AI
ScyllaDB Docs ScyllaDB CPP RS Driver Observability Logging
For AI agents: a documentation index is available at https://cpp-rs-driver.docs.scylladb.com/v1.1.2/llms.txt. A Markdown version of this page is at https://cpp-rs-driver.docs.scylladb.com/v1.1.2/topics/observability/logging.md.

Caution

You're viewing documentation for a deprecated version of ScyllaDB CPP RS Driver. Switch to the latest stable version.

Logging¶

The driver’s logging system uses stderr by default and the log level CASS_LOG_WARN. Both of these settings can be changed using the driver’s cass_log_*() configuration functions.

Important: Only setting the log level before any other interaction with the driver’s API is fully supported. Support for altering the log level during the driver’s operation is experimental, might misbehave (by displaying more or fewer logs than expected), and may be removed in the future.

Log Level¶

To update the log level use cass_log_set_level(). Pass CASS_LOG_DISABLED to silence the driver completely.

Set the level once, before calling any other driver function. Setting it later, or more than once, is experimental - see the notice above. Note also that events emitted before a custom logging callback is installed are handled by the default one, i.e. printed to stderr.

cass_log_set_level(CASS_LOG_INFO);

/* Create cluster and connect session */

Custom Logging Callback¶

The use of a logging callback allows an application to log messages to a file, syslog, or any other logging mechanism. This callback must be thread-safe because it is possible for it to be called from multiple threads concurrently. The data parameter allows custom resources to be passed to the logging callback.

void on_log(const CassLogMessage* message, void* data) {
  /* Handle logging */
}

int main() {
  void* log_data = NULL /* Custom log resource */;
  cass_log_set_callback(on_log, log_data);
  cass_log_set_level(CASS_LOG_INFO);

  /* Create cluster and connect session */

}

Was this page helpful?

PREVIOUS
Observability
NEXT
Tracing
  • Create an issue
  • Edit this page

On this page

  • Logging
    • Log Level
    • Custom Logging Callback
ScyllaDB CPP RS Driver
Search Ask AI
  • v1.1.2
    • master
    • v1.1.3
    • v1.1.2
    • v1.1.1
    • v1.1.0
    • v1.0.1
    • v1.0.0
  • ScyllaDB CPP RS Driver
  • API Documentation
    • BasicTypes
    • CassConsistency
    • CassError
    • CassValueType
    • CustomAllocator
    • Logging
    • Miscellaneous
    • CassAggregateMeta
    • CassAuthenticator
    • CassAuthenticatorCallbacks
    • CassBatch
    • CassCluster
    • CassCollection
    • CassColumnMeta
    • CassCustomPayload
    • CassDataType
    • CassErrorResult
    • CassExecProfile
    • CassFunctionMeta
    • CassFuture
    • CassIndexMeta
    • CassInet
    • CassIterator
    • CassKeyspaceMeta
    • CassMaterializedViewMeta
    • CassMetrics
    • CassNode
    • CassPrepared
    • CassResult
    • CassRetryPolicy
    • CassRow
    • CassSchemaMeta
    • CassSession
    • CassSpeculativeExecutionMetrics
    • CassSsl
    • CassStatement
    • CassTableMeta
    • CassTimestampGen
    • CassTuple
    • CassUserType
    • CassUuid
    • CassUuidGen
    • CassValue
    • CassVersion
  • Getting Started
  • Architecture Overview
  • Installation
  • Building
  • Testing
  • Using the Driver
    • Batches
    • Binding Parameters
    • Client-side timestamps
    • Consistency
    • Data Types
      • The date and time Types
      • Tuples
      • User-Defined Types (UDTs)
      • UUIDs
    • Futures
    • Handling Results
    • Keyspaces
    • Prepared Statements
    • Schema Metadata
  • Configuration
    • Load balancing
    • Retry policies
    • Speculative Execution
    • Connection
    • Execution Profiles
    • Performance Tips
    • Client Configuration
  • Security
    • Authentication
    • TLS
  • Observability
    • Logging
    • Tracing
    • Metrics
Docs Tutorials University Contact Us About Us
© 2026, ScyllaDB. All rights reserved. | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 15 Sep 2026.
Powered by Sphinx 9.1.0 & ScyllaDB Theme 1.9.3