Backporting to beta (#3623)

* Ropsten network (#3539)

* Ropsten network

* Sorted premine

* Comas

* Removed trailing coma

* --testnet set to ropset

* New registry contract address for ropsten (#3549)

* New registry for ropsten

* Registry address

* Registry with payable modifier

* Fix panic on importing own invalid transaction (#3550)

* Use patched MIO

* Trim whitespace from recovery phrase

* v1.4.5

* Appending logs by default

* Fixing phrases generated on windows

* Manually add \r to Windows phrases pre 1.4.4

* < 1.4.5

* Update test, fix number. (#3612)

* Set default tx price to 0.0025 USD

* Only support 1.4.x dictionary


Former-commit-id: 793003af5ff14bccb34e24b8b57897762647e03d
This commit is contained in:
Arkadiy Paronyan
2016-11-25 20:57:34 +01:00
committed by GitHub
parent e84819c72d
commit e7d7280a89
22 changed files with 434 additions and 71 deletions

View File

@@ -26,9 +26,8 @@ extern crate time;
#[macro_use]
extern crate lazy_static;
use std::{env, thread};
use std::{env, thread, fs};
use std::sync::Arc;
use std::fs::File;
use std::io::Write;
use isatty::{stderr_isatty, stdout_isatty};
use env_logger::LogBuilder;
@@ -80,9 +79,13 @@ pub fn setup_log(config: &Config) -> Result<Arc<RotatingLogger>, String> {
let enable_color = config.color && isatty;
let logs = Arc::new(RotatingLogger::new(levels));
let logger = logs.clone();
let mut open_options = fs::OpenOptions::new();
let maybe_file = match config.file.as_ref() {
Some(f) => Some(try!(File::create(f).map_err(|_| format!("Cannot write to log file given: {}", f)))),
Some(f) => Some(try!(open_options
.append(true).create(true).open(f)
.map_err(|_| format!("Cannot write to log file given: {}", f))
)),
None => None,
};