diff --git a/src/dwarfs/logger.cpp b/src/dwarfs/logger.cpp index 4552f2c7..e245ec0b 100644 --- a/src/dwarfs/logger.cpp +++ b/src/dwarfs/logger.cpp @@ -21,6 +21,7 @@ #include #include +#include #include #include @@ -249,7 +250,7 @@ void stream_logger::set_threshold(level_type threshold) { } std::string get_logger_context(char const* path, int line) { - auto base = ::strrchr(path, '/'); + auto base = ::strrchr(path, std::filesystem::path::preferred_separator); return fmt::format("[{0}:{1}] ", base ? base + 1 : path, line); }