diff options
Diffstat (limited to 'src/wallet/api')
-rw-r--r-- | src/wallet/api/wallet.cpp | 16 | ||||
-rw-r--r-- | src/wallet/api/wallet2_api.h | 7 | ||||
-rw-r--r-- | src/wallet/api/wallet_manager.cpp | 2 |
3 files changed, 20 insertions, 5 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index ff0d2fdbd..fb9e8b28b 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -306,8 +306,20 @@ void Wallet::init(const char *argv0, const char *default_log_base_name) { mlog_configure(mlog_get_default_log_path(default_log_base_name), true); } -void Wallet::debug(const std::string &str) { - MDEBUG(str); +void Wallet::debug(const std::string &category, const std::string &str) { + MCDEBUG(category.empty() ? MONERO_DEFAULT_LOG_CATEGORY : category.c_str(), str); +} + +void Wallet::info(const std::string &category, const std::string &str) { + MCINFO(category.empty() ? MONERO_DEFAULT_LOG_CATEGORY : category.c_str(), str); +} + +void Wallet::warning(const std::string &category, const std::string &str) { + MCWARNING(category.empty() ? MONERO_DEFAULT_LOG_CATEGORY : category.c_str(), str); +} + +void Wallet::error(const std::string &category, const std::string &str) { + MCERROR(category.empty() ? MONERO_DEFAULT_LOG_CATEGORY : category.c_str(), str); } ///////////////////////// WalletImpl implementation //////////////////////// diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h index 0c899f7c1..87c1cccfa 100644 --- a/src/wallet/api/wallet2_api.h +++ b/src/wallet/api/wallet2_api.h @@ -541,7 +541,7 @@ struct Wallet static bool addressValid(const std::string &str, NetworkType nettype); static bool addressValid(const std::string &str, bool testnet) // deprecated { - return addressValid(str, testnet ? MAINNET : TESTNET); + return addressValid(str, testnet ? TESTNET : MAINNET); } static bool keyValid(const std::string &secret_key_string, const std::string &address_string, bool isViewKey, NetworkType nettype, std::string &error); static bool keyValid(const std::string &secret_key_string, const std::string &address_string, bool isViewKey, bool testnet, std::string &error) // deprecated @@ -556,7 +556,10 @@ struct Wallet static uint64_t maximumAllowedAmount(); // Easylogger wrapper static void init(const char *argv0, const char *default_log_base_name); - static void debug(const std::string &str); + static void debug(const std::string &category, const std::string &str); + static void info(const std::string &category, const std::string &str); + static void warning(const std::string &category, const std::string &str); + static void error(const std::string &category, const std::string &str); /** * @brief StartRefresh - Start/resume refresh thread (refresh every 10 seconds) diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp index 5b6df8a9c..b03332f40 100644 --- a/src/wallet/api/wallet_manager.cpp +++ b/src/wallet/api/wallet_manager.cpp @@ -37,7 +37,7 @@ #include "common/updates.h" #include "version.h" #include "net/http_client.h" -#include "deviuce/device.hpp" +#include "device/device.hpp" #include <boost/filesystem.hpp> #include <boost/regex.hpp> |