diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2018-03-02 11:41:13 +0100 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2018-03-02 11:41:13 +0100 |
commit | 379daf936caa7fc8d7311a5dda101edb40d35ca5 (patch) | |
tree | 2d186dec6976b12a9f7b37e589c02703275a30ef /include/log.h | |
parent | d5486ba77235a874245fbee07a75cea89fa59ea2 (diff) | |
parent | c3d615b659b608f3a1d624f6fc78c303efbe1f8e (diff) | |
download | libnitrokey-379daf936caa7fc8d7311a5dda101edb40d35ca5.tar.gz libnitrokey-379daf936caa7fc8d7311a5dda101edb40d35ca5.tar.bz2 |
Merge branch 'wip-multiple_devices'
Allow to use multiple devices, iteratively.
Storage only.
Diffstat (limited to 'include/log.h')
-rw-r--r-- | include/log.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/log.h b/include/log.h index 52a6e16..2a64bef 100644 --- a/include/log.h +++ b/include/log.h @@ -23,8 +23,6 @@ #define LOG_H #include <string> -#include <cstddef> - #include <functional> namespace nitrokey { @@ -86,6 +84,11 @@ namespace nitrokey { private: LogHandler *mp_loghandler; Loglevel m_loglevel; + static std::string prefix; + public: + static void setPrefix(std::string prefix = std::string()); + + private: static Log *mp_instance; }; @@ -98,6 +101,7 @@ namespace nitrokey { #define LOGD(string) while(false){} #else #define LOG(string, level) nitrokey::log::Log::instance()((string), (level)) +#define LOGD1(string) nitrokey::log::Log::instance()((string), (nitrokey::log::Loglevel::DEBUG_L1)) #define LOGD(string) nitrokey::log::Log::instance()((string), (nitrokey::log::Loglevel::DEBUG_L2)) #endif |