Init logging with yeclite
This commit is contained in:
@@ -11,4 +11,4 @@ crate-type = ["staticlib"]
|
||||
[dependencies]
|
||||
libc = "0.2.58"
|
||||
lazy_static = "1.4.0"
|
||||
zecwalletlitelib = { git = "https://github.com/adityapk00/zecwallet-light-cli", rev = "61dc063fe155d1510e9a074e5a3577a0621f8c3a" }
|
||||
zecwalletlitelib = { git = "https://github.com/adityapk00/zecwallet-light-cli", rev = "96997c5a467b710286bc9c6fea818b9d7d76f254" }
|
||||
|
||||
@@ -57,6 +57,9 @@ pub extern fn litelib_initialize_new(dangerous: bool, server: *const c_char) ->
|
||||
}
|
||||
};
|
||||
|
||||
// Initialize logging
|
||||
let _ = lightclient.init_logging();
|
||||
|
||||
let seed = match lightclient.do_seed_phrase() {
|
||||
Ok(s) => s.dump(),
|
||||
Err(e) => {
|
||||
@@ -105,6 +108,9 @@ pub extern fn litelib_initialize_new_from_phrase(dangerous: bool, server: *const
|
||||
}
|
||||
};
|
||||
|
||||
// Initialize logging
|
||||
let _ = lightclient.init_logging();
|
||||
|
||||
LIGHTCLIENT.lock().unwrap().replace(Some(Arc::new(lightclient)));
|
||||
|
||||
let c_str = CString::new("OK").unwrap();
|
||||
@@ -137,6 +143,9 @@ pub extern fn litelib_initialize_existing(dangerous: bool, server: *const c_char
|
||||
}
|
||||
};
|
||||
|
||||
// Initialize logging
|
||||
let _ = lightclient.init_logging();
|
||||
|
||||
LIGHTCLIENT.lock().unwrap().replace(Some(Arc::new(lightclient)));
|
||||
|
||||
let c_str = CString::new("OK").unwrap();
|
||||
|
||||
@@ -169,6 +169,8 @@ void Controller::getInfoThenRefresh(bool force) {
|
||||
bool doUpdate = force || (model->getLatestBlock() != curBlock);
|
||||
model->setLatestBlock(curBlock);
|
||||
|
||||
main->logger->write(QString("Refresh. curblock ") % QString::number(curBlock) % ", update=" % (doUpdate ? "true" : "false") );
|
||||
|
||||
// Connected, so display checkmark.
|
||||
auto tooltip = Settings::getInstance()->getSettings().server + "\n" +
|
||||
QString::fromStdString(zrpc->getConnection()->getInfo().dump());
|
||||
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
|
||||
static const QString labelRegExp;
|
||||
|
||||
static const int updateSpeed = 60 * 1000; // 60 sec
|
||||
static const int updateSpeed = 30 * 1000; // 30 sec
|
||||
static const int priceRefreshSpeed = 60 * 60 * 1000; // 1 hr
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user