Skip to content

Commit 060555c

Browse files
fxlianglotem
authored andcommitted
fix: log rime::path by operator overloading
1 parent 1f9f524 commit 060555c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/rime/common.h

+5
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ class path : public std::filesystem::path {
127127
friend path operator/(const fs_path& lhs, const char* rhs) {
128128
return path(lhs) /= path(rhs);
129129
}
130+
#ifdef RIME_ENABLE_LOGGING
131+
friend std::ostream& operator<<(std::ostream& os, const path& p) {
132+
return os << p.u8string();
133+
}
134+
#endif
130135
};
131136

132137
} // namespace rime

0 commit comments

Comments
 (0)