-
Notifications
You must be signed in to change notification settings - Fork 74
v0.2.54..v0.2.55 changeset Log.h
Garret Voltz edited this page Aug 14, 2020
·
1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/util/Log.h b/hoot-core/src/main/cpp/hoot/core/util/Log.h
index 7cacedf..c221115 100644
--- a/hoot-core/src/main/cpp/hoot/core/util/Log.h
+++ b/hoot-core/src/main/cpp/hoot/core/util/Log.h
@@ -22,7 +22,7 @@
* This will properly maintain the copyright information. DigitalGlobe
* copyrights will be updated automatically.
*
- * @copyright Copyright (C) 2015, 2016, 2017, 2018, 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2015, 2016, 2017, 2018, 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
*/
#ifndef LOG_H
@@ -98,16 +98,7 @@ public:
Fatal = 5000
};
- static Log& getInstance()
- {
- if (_theInstance == NULL)
- {
- _theInstance.reset(new Log());
- _theInstance->init();
- _theInstance->setLevel(_theInstance->_level);
- }
- return *_theInstance;
- }
+ static Log& getInstance();
WarningLevel getLevel() const { return _level; }
@@ -145,14 +136,19 @@ public:
private:
+ bool notFiltered(const std::string& prettyFunction);
+
WarningLevel _level;
- static std::shared_ptr<Log> _theInstance;
static int _warnMessageLimit;
- bool _classFilterInitialized = false;
+ bool _classFilterInitialized;
QStringList _classFilter;
Log();
- bool notFiltered(const std::string& prettyFunction);
+ /** Default destructor */
+ ~Log() = default;
+ /** Delete copy constructor and assignment operator */
+ Log(const Log&) = delete;
+ Log& operator=(const Log&) = delete;
};
/**