diff --git a/include/caosdb/logging.h b/include/caosdb/logging.h
index d17c8916e73471c33f3f1abf9ecac3b149b77aea..afed074511778de38677ea921c9647b1485e54c8 100644
--- a/include/caosdb/logging.h
+++ b/include/caosdb/logging.h
@@ -29,10 +29,7 @@
 #include <memory>             // for shared_ptr
 #include <string>             // for string
 #include <vector>             // for vector
-
-namespace std::filesystem {
-class path;
-}
+#include <filesystem>         // for path
 
 namespace caosdb::logging {
 
@@ -51,7 +48,7 @@ public:
   auto operator<<(const std::string &msg) -> LoggerOutputStream &;
   auto operator<<(void *msg) -> LoggerOutputStream &;
   auto operator<<(std::filesystem::path *path) -> LoggerOutputStream &;
-  LoggerOutputStream &operator<<(const std::filesystem::path &path);
+  auto operator<<(const std::filesystem::path &path) -> LoggerOutputStream &;
 
   static auto get(const std::string &channel, int level) -> LoggerOutputStream {
     return LoggerOutputStream(channel, level);