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
Ask AI
ScyllaDB Docs ScyllaDB CPP RS Driver API Documentation Logging

Caution

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

Logging¶

enum CassLogLevel¶

Values:

enumerator CASS_LOG_DISABLED¶
enumerator CASS_LOG_CRITICAL¶
enumerator CASS_LOG_ERROR¶
enumerator CASS_LOG_WARN¶
enumerator CASS_LOG_INFO¶
enumerator CASS_LOG_DEBUG¶
enumerator CASS_LOG_TRACE¶
typedef void (*CassLogCallback)(const CassLogMessage *message, void *data)¶

A callback that’s used to handle logging.

See also

cass_log_set_callback()

Param message:

[in]

Param data:

[in] user defined data provided when the callback was registered.

void cass_log_set_level(CassLogLevel log_level)¶

Sets the log level.

Note: This needs to be done before any call that might log, such as any of the cass_cluster_*() or cass_ssl_*() functions.

Default: CASS_LOG_WARN

Parameters:

log_level – [in]

void cass_log_set_callback(CassLogCallback callback, void *data)¶

Sets a callback for handling logging events.

Note: This needs to be done before any call that might log, such as any of the cass_cluster_*() or cass_ssl_*() functions.

Default: An internal callback that prints to stderr

Parameters:
  • data – [in] An opaque data object passed to the callback.

  • callback – [in] A callback that handles logging events. This is called in a separate thread so access to shared data must be synchronized.

void cass_log_get_callback_and_data(CassLogCallback *callback_out, void **data_out)¶

Analogous getter - useful for restoring logger to previous values.

Parameters:
  • callback_out – [out] Current logging callback. Must point to a valid memory area.

  • data_out – [out] Current Logger instance. Must point to a valid memory area.

const char *cass_log_level_string(CassLogLevel log_level)¶

Gets the string for a log level.

Parameters:

log_level – [in]

Returns:

A null-terminated string for the log level. Example: “ERROR”, “WARN”, “INFO”, etc.

struct CassLogMessage¶
#include <cassandra.h>

A log message.

Public Members

cass_uint64_t time_ms¶

The millisecond timestamp (since the Epoch) when the message was logged

CassLogLevel severity¶

The severity of the log message

const char *file¶

The file where the message was logged

int line¶

The line in the file where the message was logged

const char *function¶

The function where the message was logged

char message[1024]¶

The message

Was this page helpful?

PREVIOUS
CustomAllocator
NEXT
Miscellaneous
  • Create an issue
  • Edit this page

On this page

  • Logging
    • CassLogLevel
      • CASS_LOG_DISABLED
      • CASS_LOG_CRITICAL
      • CASS_LOG_ERROR
      • CASS_LOG_WARN
      • CASS_LOG_INFO
      • CASS_LOG_DEBUG
      • CASS_LOG_TRACE
    • CassLogCallback
    • cass_log_set_level()
    • cass_log_set_callback()
    • cass_log_get_callback_and_data()
    • cass_log_level_string()
    • CassLogMessage
      • time_ms
      • severity
      • file
      • line
      • function
      • message
ScyllaDB CPP RS Driver
  • master
    • master
    • 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 17 Mar 2026.
Powered by Sphinx 9.1.0 & ScyllaDB Theme 1.9.1
Ask AI