| 1234567891011121314151617181920212223 |
- #include "smartbotic/common.hpp"
- #include <spdlog/spdlog.h>
- #include <format>
- namespace smartbotic::common {
- auto Version::GetString() -> std::string {
- return std::format("{}.{}.{}", kMajor, kMinor, kPatch);
- }
- void Initialize(std::string_view app_name) {
- spdlog::set_pattern("[%Y-%m-%d %H:%M:%S.%e] [%n] [%^%l%$] %v");
- spdlog::info("{} v{} initializing", app_name, Version::GetString());
- }
- void Shutdown() {
- spdlog::info("Shutting down");
- spdlog::shutdown();
- }
- } // namespace smartbotic::common
|