Logger
can be used to capture internal logs to find and solve problems.
This library contains two default Logger
implementions:
A logger writes messages to console.
The example code to create it:
auto logger = cql::Logger::createConsole(cql::LogLevel::Debug);
Supported log levels:
- LogLevel::Emergency
- LogLevel::Alert
- LogLevel::Critical
- LogLevel::Error
- LogLevel::Warning
- LogLevel::Notice
- LogLevel::Info
- LogLevel::Debug
A do-nothing logger.
auto logger = cql::Logger::createNoop();
You can specify the logger in session configuration by calling SessionConfiguration::setLogger
, for example:
auto configuration = cql::SessionConfiguration()
.setMinPoolSize(1)
.setMaxPoolSize(100)
.setDefaultKeySpace("system")
.setLogger(cql::Logger::createConsole(cql::LogLevel::Debug));