X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FLogger%2FFileTarget.hh;h=5a80a7a0c84081cb382d43fbb9b4c57299d23c0e;hb=61dc3812717cdc89fa2402006d4009236b72dc8f;hp=ccd78fcbc3ad4a670e239b2b095b3825a4c93e6c;hpb=6cfb0a8ca46d3cb0cc521a75118027ecc3fa4ef1;p=senf.git diff --git a/Utils/Logger/FileTarget.hh b/Utils/Logger/FileTarget.hh index ccd78fc..5a80a7a 100644 --- a/Utils/Logger/FileTarget.hh +++ b/Utils/Logger/FileTarget.hh @@ -28,6 +28,7 @@ // Custom includes #include +#include #include #include "IOStreamTarget.hh" @@ -35,6 +36,9 @@ ///////////////////////////////hh.p//////////////////////////////////////// namespace senf { + + namespace console { class DirectoryNode; } + namespace log { /** \brief Log target writing to a %log file. @@ -65,7 +69,7 @@ namespace log { ///\name Structors and default members ///@{ - explicit FileTarget(std::string const & filename); + explicit FileTarget(std::string const & filename, std::string const & nodename = ""); ///< Construct FileTarget writing to \a file ///@} @@ -74,12 +78,15 @@ namespace log { void reopen(); ///< Reopen %log after log-file rotation void reopen(std::string const & file); ///< Reopen %log under a new name + std::string const & filename() const; ///< Return current log file name + private: std::string file_; struct RegisterConsole { RegisterConsole(); - static void create(std::string const & filename); + static boost::shared_ptr create( + std::string const & filename, std::string const & nodename); static RegisterConsole instance; }; };