LoggerConfig
Runtime configuration for the SDK logging bootstrap.
The configuration deliberately stays small so the common case is still a single initLogger() call. The defaults target production deployments by preferring the best backend compiled into the library, writing spdlog files under /var/log, enabling journald when that backend supports it, and using the Qt log category name as the logger scope unless a custom mapping overrides it.
Public Attributes
Section titled “Public Attributes”| Return | Name | Description |
|---|---|---|
BackendType | backend | Selects which backend should be activated for this process. |
QString | applicationName | Logical application name used when deriving default logger names and filenames. |
QString | logDirectory | Directory that should receive the asynchronous file sink when the spdlog backend is active. |
QString | logFileName | Optional explicit log filename for the spdlog backend. |
bool | enableJournald | Enables the journald sink when the spdlog backend was built with Linux journald support. |
bool | enableStacktraces | Enables best-effort stacktrace capture for fatal Qt log messages. |
QHash<QString, QString> | categoryMappings | Optional overrides from Qt log category names to backend sink/logger names. |
backend
Section titled “backend”Type: BackendType
Selects which backend should be activated for this process.
Default chooses Spdlog.
applicationName
Section titled “applicationName”Logical application name used when deriving default logger names and filenames.
Both concrete logging paths use this name when they need an application-scoped fallback for output formatting or spdlog-managed filenames.
logDirectory
Section titled “logDirectory”Directory that should receive the asynchronous file sink when the spdlog backend is active.
Only the Spdlog backend uses this field because the direct QtLogging path writes straight to the process output streams instead of managing file sinks.
logFileName
Section titled “logFileName”Optional explicit log filename for the spdlog backend.
When empty, <applicationName>.log is derived. Only the Spdlog backend uses this field because the direct QtLogging path does not manage file sinks.
enableJournald
Section titled “enableJournald”Enables the journald sink when the spdlog backend was built with Linux journald support.
Only the Spdlog backend uses this field because the direct QtLogging path does not route logs through journald.
enableStacktraces
Section titled “enableStacktraces”Enables best-effort stacktrace capture for fatal Qt log messages.
Both concrete logging paths use this flag when they render fatal records.
categoryMappings
Section titled “categoryMappings”Optional overrides from Qt log category names to backend sink/logger names.
Both built-in backends use the same mapping semantics so applications can keep one shared configuration shape regardless of which backend becomes active.