From 0415b98195555c76c66a97c9c01c524d641844e9 Mon Sep 17 00:00:00 2001 From: Reinhard Pfau Date: Mon, 20 Oct 2008 09:25:30 +0000 Subject: [PATCH] libi2ncommon: (reinhard) added method for retrieving the log file name. --- src/logfunc.cpp | 14 ++++++++++++++ src/logfunc.hpp | 2 +- 2 files changed, 15 insertions(+), 1 deletions(-) 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(); -- 1.7.1