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

Strip out control codes from the logged messages #10081

Merged

Conversation

koute
Copy link
Contributor

@koute koute commented Oct 22, 2021

No description provided.

@koute koute added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Oct 22, 2021
@koute koute requested review from gilescope and bkchr October 22, 2021 08:59
@bkchr
Copy link
Member

bkchr commented Nov 1, 2021

bot merge

@paritytech-processbot
Copy link

Waiting for commit status.

@paritytech-processbot
Copy link

Bot will approve on the behalf of @bkchr, since they are a team lead, in an attempt to reach the minimum approval count

@paritytech-processbot paritytech-processbot bot merged commit dc29596 into paritytech:master Nov 1, 2021
@MOZGIII
Copy link
Contributor

MOZGIII commented Jan 6, 2022

Why wasn't strip_control_codes shared? If there's no good rationale - I'd create a PR to share it into yet another primitive create.

We need this for a custom panic handler - and copy-pasting cross-repos doesn't seem like a good idea.

@bkchr
Copy link
Member

bkchr commented Jan 6, 2022

Because we don't wanted to create a crate for just one function and no, there is no other crate where this really fits into.

@gilescope
Copy link
Contributor

gilescope commented Feb 3, 2022 via email

grishasobol pushed a commit to gear-tech/substrate that referenced this pull request Mar 28, 2022
* Strip out control codes from the logged messages

* Also strip away C1 control codes

* Add extra comments

* Clear the buffer after flushing; rename `write` to `flush`

* Move control code stripping into its own function

* Also strip out control codes from panic messages

* Also strip out Unicode left-to-right/right-to-left control codes
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
* Strip out control codes from the logged messages

* Also strip away C1 control codes

* Add extra comments

* Clear the buffer after flushing; rename `write` to `flush`

* Move control code stripping into its own function

* Also strip out control codes from panic messages

* Also strip out Unicode left-to-right/right-to-left control codes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants