diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2017-07-24 23:43:07 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2017-07-24 23:43:07 +0200 |
| commit | 2dbfb58efe5e53b56bfda3ed21a3e41562205437 (patch) | |
| tree | 1f37423bc091a66930316add25258d3a934ffc0a /src/logger.cc | |
| parent | 5540079928fd36e656becdbaff7e44138a647ede (diff) | |
Add tools -> Generate CA
Added file field to GuiForm
Diffstat (limited to 'src/logger.cc')
| -rw-r--r-- | src/logger.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/logger.cc b/src/logger.cc index 343bb4d..df1af0c 100644 --- a/src/logger.cc +++ b/src/logger.cc @@ -127,6 +127,12 @@ private: FILE* fh_; }; +class NullLogger : public Logger { +public: + void out(Level UNUSED(lvl), char const* UNUSED(format), ...) override { + } +}; + } // namespace // static @@ -147,3 +153,9 @@ Logger* Logger::create_file(std::string const& path) { } return nullptr; } + +// static +Logger* Logger::null() { + static NullLogger logger; + return &logger; +} |
