X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FLogger%2FFileTarget.hh;h=5c4cc342944896ea34ca9f75bf46c4b0f9b3bc8a;hb=412024ed31a4ab4eaea7a4165a434f8efebee325;hp=9bc933194a6a6916739d9dd8f64635ce80fab180;hpb=f73fa16ed5abdce272ac77f8b8b9ef2b9922c266;p=senf.git diff --git a/Utils/Logger/FileTarget.hh b/Utils/Logger/FileTarget.hh index 9bc9331..5c4cc34 100644 --- a/Utils/Logger/FileTarget.hh +++ b/Utils/Logger/FileTarget.hh @@ -1,8 +1,8 @@ // $Id$ // -// Copyright (C) 2007 -// Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Copyright (C) 2007 +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -23,8 +23,8 @@ /** \file \brief FileTarget public header */ -#ifndef HH_FileTarget_ -#define HH_FileTarget_ 1 +#ifndef HH_SENF_Utils_Logger_FileTarget_ +#define HH_SENF_Utils_Logger_FileTarget_ 1 // Custom includes #include @@ -37,12 +37,19 @@ namespace senf { namespace log { - /** \brief Log target writing to a log file. + /** \brief Log target writing to a %log file. - The FileTarget will save all log messages in the given file. Messages will be appended at + The FileTarget will save all %log messages in the given file. Messages will be appended at the end of the file. - After log files have been rotated, the reopen() member should be called to create a new log + \code + senf::log::FileTarget target ("file.name"); + + // Route all messages to this file. + target.route(); + \endcode + + After %log files have been rotated, the reopen() member should be called to create a new %log file. \ingroup targets @@ -63,8 +70,8 @@ namespace log { ///@} /////////////////////////////////////////////////////////////////////////// - void reopen(); ///< Reopen log after log-file rotation - void reopen(std::string file); ///< Reopen log under a new name + void reopen(); ///< Reopen %log after log-file rotation + void reopen(std::string file); ///< Reopen %log under a new name private: std::string file_;