|
|
#define | TESSERACT_LOG_SOURCE_LOCATION spdlog::source_loc { __FILE__, __LINE__, SPDLOG_FUNCTION } |
| | Capture the current source file, line, and function for a log record.
|
| |
| #define | TESSERACT_LOG_NAMED(name, severity, ...) ::tesseract::common::detail::logNamed(name, spdlog::level::severity, TESSERACT_LOG_SOURCE_LOCATION, __VA_ARGS__) |
| | Emit a formatted structured record through a named logger.
|
| |
|
#define | TESSERACT_LOG_DEFAULT(severity, ...) ::tesseract::common::detail::logDefault(spdlog::level::severity, TESSERACT_LOG_SOURCE_LOCATION, __VA_ARGS__) |
| | Emit a formatted structured record through the default logger.
|
| |
|
#define | TESSERACT_LOG_TRACE(...) TESSERACT_LOG_DEFAULT(trace, __VA_ARGS__) |
| | Emit a trace record through the default tesseract logger.
|
| |
|
#define | TESSERACT_LOG_DEBUG(...) TESSERACT_LOG_DEFAULT(debug, __VA_ARGS__) |
| | Emit a debug record through the default tesseract logger.
|
| |
|
#define | TESSERACT_LOG_INFO(...) TESSERACT_LOG_DEFAULT(info, __VA_ARGS__) |
| | Emit an informational record through the default tesseract logger.
|
| |
|
#define | TESSERACT_LOG_WARN(...) TESSERACT_LOG_DEFAULT(warn, __VA_ARGS__) |
| | Emit a warning record through the default tesseract logger.
|
| |
|
#define | TESSERACT_LOG_ERROR(...) TESSERACT_LOG_DEFAULT(err, __VA_ARGS__) |
| | Emit an error record through the default tesseract logger.
|
| |
|
#define | TESSERACT_LOG_CRITICAL(...) TESSERACT_LOG_DEFAULT(critical, __VA_ARGS__) |
| | Emit a critical record through the default tesseract logger.
|
| |
|
#define | TESSERACT_LOG_TRACE_NAMED(name, ...) TESSERACT_LOG_NAMED(name, trace, __VA_ARGS__) |
| | Emit a trace record through a named logger.
|
| |
|
#define | TESSERACT_LOG_DEBUG_NAMED(name, ...) TESSERACT_LOG_NAMED(name, debug, __VA_ARGS__) |
| | Emit a debug record through a named logger.
|
| |
|
#define | TESSERACT_LOG_INFO_NAMED(name, ...) TESSERACT_LOG_NAMED(name, info, __VA_ARGS__) |
| | Emit an informational record through a named logger.
|
| |
|
#define | TESSERACT_LOG_WARN_NAMED(name, ...) TESSERACT_LOG_NAMED(name, warn, __VA_ARGS__) |
| | Emit a warning record through a named logger.
|
| |
|
#define | TESSERACT_LOG_ERROR_NAMED(name, ...) TESSERACT_LOG_NAMED(name, err, __VA_ARGS__) |
| | Emit an error record through a named logger.
|
| |
|
#define | TESSERACT_LOG_CRITICAL_NAMED(name, ...) TESSERACT_LOG_NAMED(name, critical, __VA_ARGS__) |
| | Emit a critical record through a named logger.
|
| |
|
|
using | tesseract::common::LogAttribute = std::variant< bool, std::int64_t, std::uint64_t, double, std::string > |
| | Scalar value supported by a structured log-record attribute.
|
| |
|
using | tesseract::common::LogAttributes = std::unordered_map< std::string, LogAttribute > |
| | Collection of structured attributes indexed by attribute name.
|
| |
|
using | tesseract::common::LogRecordHandler = std::function< void(const LogRecord &)> |
| | Callback invoked for each structured record that passes spdlog filtering.
|
| |
|
using | tesseract::common::LogRecordHandlerId = std::uint64_t |
| | Opaque identifier assigned to a registered structured-record handler.
|
| |
|
| std::shared_ptr< spdlog::logger > | tesseract::common::getLogger (std::string_view name="tesseract") |
| | Get the Tesseract-owned default logger or a registered named logger.
|
| |
| void | tesseract::common::setLogger (std::shared_ptr< spdlog::logger > logger) |
| | Replace the default Tesseract logger.
|
| |
| bool | tesseract::common::isLogLevelEnabled (spdlog::level::level_enum level) noexcept |
| | Check whether the default Tesseract logger accepts a severity.
|
| |
| LogRecordHandlerId | tesseract::common::addLogRecordHandler (LogRecordHandler handler) |
| | Register a callback that receives structured log records.
|
| |
| bool | tesseract::common::removeLogRecordHandler (LogRecordHandlerId id) noexcept |
| | Unregister a structured-record callback.
|
| |
| void | tesseract::common::emitLogRecord (const LogRecord &record) noexcept |
| | Emit a structured record through its spdlog logger and all registered handlers.
|
| |
|
spdlog::logger * | tesseract::common::detail::getDefaultLogger () noexcept |
| | Get the default logger through the lock-free logging path.
|
| |
|
void | tesseract::common::detail::emitLogRecord (spdlog::logger &logger, const LogRecord &record) noexcept |
| | Emit a record through an already-resolved logger.
|
| |
| template<typename... Args> |
| void | tesseract::common::detail::log (spdlog::logger &logger, spdlog::level::level_enum level, spdlog::source_loc source_location, fmt::format_string< Args... > format, Args &&... args) noexcept |
| | Format and emit a record for the Tesseract convenience macros.
|
| |
|
template<typename... Args> |
| void | tesseract::common::detail::logDefault (spdlog::level::level_enum level, spdlog::source_loc source_location, fmt::format_string< Args... > format, Args &&... args) noexcept |
| | Resolve the default logger and emit a formatted record.
|
| |
|
template<typename... Args> |
| void | tesseract::common::detail::logNamed (std::string_view logger_name, spdlog::level::level_enum level, spdlog::source_loc source_location, fmt::format_string< Args... > format, Args &&... args) noexcept |
| | Resolve a named logger and emit a formatted record.
|
| |
Structured logging extensions for spdlog.
- Author
- Levi Armstrong
- Date
- September 24, 2026
- Copyright
- Copyright (c) 2017, Southwest Research Institute
- License
- Software License Agreement (Apache License)
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.