Skip to content

fmt / spdlog 源码级深度剖析

源码路径:references/impl/fmt/include/fmt/, references/impl/spdlog/include/spdlog/

fmt 是 C++ 格式化库的事实标准,直接被 C++20 标准采纳为 std::formatspdlog 是最流行的日志库,基于 fmt 构建。

目录

章节源码路径内容
fmt 格式化引擎base.h, format.h编译期格式串检查、类型擦除 tagged union、Dragonbox 浮点
fmt 高级特性chrono.h, ranges.h, compile.h自定义类型、编译期格式化、chrono、ranges
spdlog 架构spdlog.h, logger.h, sinks/Logger/Sink/Formatter、异步模式、日志级别裁剪

基于 MIT 许可发布