libi2ncommon: (reinhard) added method for retrieving the log file name.
authorReinhard Pfau <reinhard.pfau@intra2net.com>
Mon, 20 Oct 2008 09:25:30 +0000 (09:25 +0000)
committerReinhard Pfau <reinhard.pfau@intra2net.com>
Mon, 20 Oct 2008 09:25:30 +0000 (09:25 +0000)
src/logfunc.cpp
src/logfunc.hpp

index 10f44f7..e72e14b 100644 (file)
@@ -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).
  */
index 0e61cab..02ad031 100644 (file)
@@ -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();