Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Improved logging #138

Merged
merged 2 commits into from
Apr 18, 2018
Merged

Improved logging #138

merged 2 commits into from
Apr 18, 2018

Conversation

arkpar
Copy link
Member

@arkpar arkpar commented Apr 17, 2018

No description provided.

@arkpar arkpar added the A0-please_review Pull request needs code review. label Apr 17, 2018
@gavofyork gavofyork added A8-looksgood and removed A0-please_review Pull request needs code review. labels Apr 18, 2018
@gavofyork
Copy link
Member

as a side note, i would generally prefer to get structured logging in before fleshing out unformatted logging too much.

let enable_color = isatty;

let format = move |record: &log::LogRecord| {
let timestamp = time::strftime("%Y-%m-%d %H:%M:%S", &time::now()).unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unwrap?


fn kill_color(s: &str) -> String {
lazy_static! {
static ref RE: regex::Regex = regex::Regex::new("\x1b\\[[^m]+m").unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would prefer an expect just so that if this did panic we could easily locate it

@arkpar arkpar added A0-please_review Pull request needs code review. and removed A5-grumble labels Apr 18, 2018
@rphmeier rphmeier added A8-looksgood and removed A0-please_review Pull request needs code review. labels Apr 18, 2018
@rphmeier rphmeier merged commit 57eb390 into master Apr 18, 2018
@arkpar arkpar deleted the ark-log branch July 9, 2018 09:03
JoshOrndorff pushed a commit to moonbeam-foundation/substrate that referenced this pull request Apr 21, 2021
liuchengxu pushed a commit to chainx-org/substrate that referenced this pull request Aug 23, 2021
* btcbridge CandidateTx and records withdraw cache

* Fix precision and initialization error

* Initialize balance of alice same with activation_per_share

* Tweak initial intention profile

* fix bug for withdraw in canonize, add no_withdrawal flag

* Can not unstake when still in frozen

* Fix some bug

* Tweak session_length and sessions_per_era

* Fix bug: Only candidate confirmed can create new proposal

* Fix unexpect deposit

* Tweak staking fees

* Fix bug: Add unexpect in Candidate to handle unexpect deposit

* Fix/match precision (paritytech#131)

* fix pending order precision

* add tests

* Update genesis_config

* Fix when candidate initialize

* Recover AccountMap to support btc register

* Update genesis BlockHeader

* Fix select utxo must balance > 0

* move best index set before deposit/withdraw in canonize

* Fix build error

* Modify > irr_block as >=

* Fix bug: Only candidate is not confirmed can modifi it status

* Fix btc transaction correlation

* Adjust PCX precision in session reward (paritytech#134)

* Fix/match precision (paritytech#132)

* fix pending order precision

* add tests

* add reserve last

* 1. Fix UTXOList bug (paritytech#136)

2. Update genesis_config irr_block from 0 to 2

* Remove String (paritytech#137)

* Reserve initial nomination (paritytech#138)

* Fix wasm build error

* Init nominees of initial intenions (paritytech#139)

* UTXO only store value > 0

* Init channel (paritytech#140)

* Init channel relationship

* Init genesis intention

* chance channel name (paritytech#141)

* fix fill fee (paritytech#142)

* Tweak parameters
liuchengxu pushed a commit to autonomys/substrate that referenced this pull request Jun 3, 2022
Eliminate wildcard imports (except prelude) to make it clearer what is imported where
helin6 pushed a commit to boolnetwork/substrate that referenced this pull request Jul 25, 2023
…tech#138)

* Extract extrinsic

* Extract extrinsic types to own module

* Fix compiler errors

* Fix warnings

* Fmt

* Pin wabt-sys to 0.7.1, it fails (on my machine) with 0.7.2

* Fix up tests

* Fmt

* Reexport RuntimeVersion
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants