307 database.connection_string = connection_str;
377 bool enable =
true, std::chrono::milliseconds threshold = std::chrono::milliseconds(1000))
417 bool enable =
true, std::uint16_t port = 9090,
const std::string& endpoint =
"/metrics")
460 const std::string& key_path =
"")
db_log_level
Database logging level enumeration.
@ trace
Most verbose, includes all operations.
@ warning
Warning conditions.
@ critical
Critical failures requiring immediate attention.
@ debug
Debug information for development.
@ info
Informational messages (default)
@ fatal
Fatal errors causing system shutdown.
thread_pool_type
Thread pool implementation type.
@ typed
Typed thread pool with priority support.
@ standard
Standard thread pool (default)
backend_type
Database backend type enumeration.
@ mongodb
MongoDB NoSQL database.
@ sqlite
SQLite embedded database.
@ redis
Redis key-value store.
@ postgres
PostgreSQL database.
Database-specific configuration.
bool enable_prepared_statements
Enable prepared statement caching.
std::string ssl_key_path
Path to SSL key file.
std::size_t query_cache_size
Maximum size of query cache in bytes.
std::string password
Database password (stored in memory - consider using secrets management)
bool enable_query_cache
Enable query result caching.
std::string ssl_cert_path
Path to SSL certificate file.
bool enable_ssl
Enable SSL/TLS for database connections.
std::string connection_string
Connection string (format depends on backend)
backend_type type
Database backend type.
std::string username
Database username.
bool enable_query_logging
Log all SQL queries executed.
bool enable_file_logging
Enable logging to file (in addition to console)
std::string log_directory
Directory for log files.
std::size_t log_rotation_size
Log file rotation size in bytes (0 = no rotation)
std::chrono::milliseconds slow_query_threshold
Threshold for considering a query "slow".
bool enable_connection_logging
Log connection pool events (acquire, release, etc.)
bool log_slow_queries
Automatically detect and log slow queries.
std::size_t log_rotation_count
Number of rotated log files to keep.
db_log_level min_log_level
Minimum log level to output.
Monitoring and metrics configuration.
bool enable_prometheus_export
Enable Prometheus metrics export.
std::uint16_t prometheus_port
Port for Prometheus metrics server.
bool enable_profiling
Enable performance profiling.
bool enable_metrics
Enable metrics collection.
std::chrono::seconds metrics_interval
Interval for collecting metrics.
std::chrono::milliseconds query_latency_warning
Warn when query latency exceeds this threshold.
bool enable_health_checks
Enable health check endpoints.
double connection_usage_warning_threshold
Warn when connection pool usage exceeds this percentage (0.0-1.0)
std::string prometheus_endpoint
HTTP endpoint for Prometheus scraping.
Thread pool configuration for async operations.
thread_pool_type pool_type
Thread pool implementation type.
std::string pool_name
Name for this thread pool (for logging and monitoring)
bool enable_priority_scheduling
Enable priority-based task scheduling.
std::size_t max_queue_size
Maximum queued tasks (0 = unlimited)
std::size_t thread_count
Number of worker threads (0 = auto-detect from hardware)
Connection pool configuration.
std::string pool_name
Unique name for this pool (for logging and monitoring)
std::chrono::seconds health_check_interval
Interval between health checks.
std::size_t min_connections
Minimum number of connections to maintain.
std::chrono::seconds connection_timeout
Timeout for acquiring a connection from the pool.
std::chrono::seconds idle_timeout
Time before an idle connection is closed.
bool enable_health_checks
Enable periodic health checks on connections.
std::size_t max_connections
Maximum number of connections allowed.
bool enable_priority_queue
Enable priority-based connection acquisition.
unified_db_config & enable_slow_query_logging(bool enable=true, std::chrono::milliseconds threshold=std::chrono::milliseconds(1000))
Configure slow query detection.
unified_db_config & set_timeouts(std::chrono::seconds acquisition, std::chrono::seconds idle)
Set connection timeouts.
unified_db_config & set_pool_size(std::size_t min, std::size_t max)
Configure connection pool size.
unified_db_config & set_backend(backend_type type, const std::string &connection_str)
Set database backend type and connection string.
db_logger_config logger
Logger configuration.
unified_db_config & set_credentials(const std::string &user, const std::string &pass)
Set database credentials.
unified_db_config & enable_ssl(bool enable=true, const std::string &cert_path="", const std::string &key_path="")
Enable SSL/TLS for database connections.
unified_db_config & enable_monitoring(bool enable=true)
Enable/disable monitoring.
unified_db_config & set_thread_count(std::size_t count)
Set thread pool size.
unified_db_config & enable_prometheus(bool enable=true, std::uint16_t port=9090, const std::string &endpoint="/metrics")
Configure Prometheus metrics export.
pool_config connection_pool
Connection pool configuration.
unified_db_config & set_pool_name(const std::string &name)
Set connection pool name.
unified_db_config & set_log_level(db_log_level level)
Set minimum logging level.
unified_db_config & enable_priority_scheduling(bool enable=true)
Enable priority-based scheduling.
bool enable_thread_system_integration
Enable thread_system integration (typed thread pools)
db_monitoring_config monitoring
Monitoring configuration.
bool enable_monitoring_system_integration
Enable monitoring_system integration.
unified_db_config & enable_file_logging(bool enable=true, const std::string &directory="./logs")
Enable file logging.
unified_db_config & enable_query_logging(bool enable=true)
Enable/disable query logging.
bool enable_common_system_integration
Enable common_system integration (Result pattern, ILogger, LOG_* macros)
db_thread_config thread
Thread pool configuration.
database_config database
Database connection configuration.