From: Reinhard Pfau Date: Mon, 20 Oct 2008 09:25:30 +0000 (+0000) Subject: libi2ncommon: (reinhard) added method for retrieving the log file name. X-Git-Tag: v2.6~145 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=0415b98195555c76c66a97c9c01c524d641844e9;p=libi2ncommon libi2ncommon: (reinhard) added method for retrieving the log file name. --- diff --git a/src/logfunc.cpp b/src/logfunc.cpp index 10f44f7..e72e14b 100644 --- a/src/logfunc.cpp +++ b/src/logfunc.cpp @@ -666,6 +666,20 @@ bool is_logging_to_file() } // eo is_logging_to_file() + +/** + * @brief returns the current name of the log file. + * @return the name of the log file; empty if none was given. + * + * This function returns the last used log file name; even + * when logging to that file is currently disabled. + */ +std::string get_log_file_name() +{ + return g_log_file_name; +} // eo get_log_file_name() + + /** * @brief re-opens the logfiles (if applicable). */ diff --git a/src/logfunc.hpp b/src/logfunc.hpp index 0e61cab..02ad031 100644 --- a/src/logfunc.hpp +++ b/src/logfunc.hpp @@ -185,7 +185,7 @@ void enable_log_file( const std::string& name ); void enable_log_file( bool enable= true ); bool is_logging_to_file(); - +std::string get_log_file_name(); void reopen();