Commit c1df9b3f24a7e5d86c1f3a91bb9e3e1ad20010d9

Authored by Jürgen Knödlseder
1 parent 7c9f515a

Do no longer open the log file in GApplication constructor

Showing 1 changed file with 15 additions and 9 deletions
src/app/GApplication.cpp
... ... @@ -49,6 +49,8 @@ const int header_width = 80; //!< Header width
49 49  
50 50 /***********************************************************************//**
51 51 * @brief Void constructor
  52 + *
  53 + * Constructs an empty application.
52 54 ***************************************************************************/
53 55 GApplication::GApplication(void)
54 56 {
... ... @@ -66,9 +68,13 @@ GApplication::GApplication(void)
66 68 * @param[in] name Application name.
67 69 * @param[in] version Application version.
68 70 *
69   - * Constructs an application from an application @p name and @p version. The
70   - * application parameters will be loaded from the parameter file. No log
71   - * file will be opened.
  71 + * Constructs an application from an application @p name and @p version. The
  72 + * constructor will set the parameter filename to "<name>.par" and the log
  73 + * filename to "<name>".log. The parameters will be loaded from the parameter
  74 + * file.
  75 + *
  76 + * No log file will be opened. To open the log file an explicit call to the
  77 + * logFileOpen() method is required.
72 78 *
73 79 * This constructor should be used for Python scripts.
74 80 ***************************************************************************/
... ... @@ -106,9 +112,12 @@ GApplication::GApplication(const std::string&amp; name, const std::string&amp; version)
106 112 * @param[in] argv Command line arguments
107 113 *
108 114 * Constructs an application from an application @p name, @p version and a
109   - * number @p argc of command line arguments @p argv. The application
110   - * parameters will be loaded from the parameter file and the log file will
111   - * be opened.
  115 + * number @p argc of command line arguments @p argv. The constructor will
  116 + * set the parameter filename to "<name>.par" and the log filename to
  117 + * "<name>".log. The parameters will be loaded from the parameter file.
  118 + *
  119 + * No log file will be opened. To open the log file an explicit call to the
  120 + * logFileOpen() method is required.
112 121 *
113 122 * This constructor should be used for C++ applications.
114 123 ***************************************************************************/
... ... @@ -153,9 +162,6 @@ GApplication::GApplication(const std::string&amp; name, const std::string&amp; version,
153 162 set_log_filename();
154 163 set_log_chatter();
155 164  
156   - // Initialise the application logger
157   - logFileOpen();
158   -
159 165 } // endif: no --help option specified
160 166  
161 167 // Return
... ...