@@ -428,19 +428,17 @@ class Log : public QuantLib::Singleton<Log, std::integral_constant<bool, true>>
428428 */
429429 void removeAllLoggers ();
430430
431- std::string source (const char * filename, int lineNo);
432-
433431 void addExcludeFilter (const std::string&, const std::function<bool (const std::string&)>);
434432
435433 void removeExcludeFilter (const std::string&);
436434
437435 bool checkExcludeFilters (const std::string&);
438436
439- // ! macro utility function - do not use directly
437+ // ! macro utility function - do not use directly, not thread safe
440438 void header (unsigned m, const char * filename, int lineNo);
441- // ! macro utility function - do not use directly
439+ // ! macro utility function - do not use directly, not thread safe
442440 std::ostream& logStream () { return ls_; }
443- // ! macro utility function - do not use directly
441+ // ! macro utility function - do not use directly, not thread safe
444442 void log (unsigned m);
445443
446444 // ! mutex to acquire locks
@@ -500,6 +498,9 @@ class Log : public QuantLib::Singleton<Log, std::integral_constant<bool, true>>
500498private:
501499 Log ();
502500
501+ // not thread safe
502+ std::string source (const char * filename, int lineNo) const ;
503+
503504 std::map<std::string, boost::shared_ptr<Logger>> loggers_;
504505 std::map<std::string, boost::shared_ptr<IndependentLogger>> independentLoggers_;
505506 bool enabled_;
0 commit comments