Skip to content

src: colorize output - #225

Closed
Drieger wants to merge 4 commits into
nodejs:masterfrom
Drieger:start_colorization
Closed

Drieger wants to merge 4 commits into
nodejs:masterfrom
Drieger:start_colorization

Conversation

@Drieger

@Drieger Drieger commented Aug 27, 2018

Copy link
Copy Markdown
Contributor

Add colors to llnode output and introduce a settings class, which allow users to select if it should always use colorization, never use colorization or if it should auto select based on current output and color support. By default option auto, to change this option one should use the following command

v8 settings set color <always|never|auto>

Almost all output of findjsinstances are already colorized, I'm still working on other commands. Image below shows an output example.

screenshot from 2018-08-27 10-52-29

@Drieger
Drieger force-pushed the start_colorization branch 2 times, most recently from cd43b14 to d739920 Compare September 4, 2018 19:37
@Drieger
Drieger force-pushed the start_colorization branch 3 times, most recently from e070f2a to 55aeb93 Compare September 10, 2018 11:10
mmarchini

This comment was marked as off-topic.

@Drieger

Drieger commented Sep 18, 2018

Copy link
Copy Markdown
Contributor Author

@mmarchini I think all requests were addressed on last commit

mmarchini

This comment was marked as off-topic.

@mmarchini

Copy link
Copy Markdown
Contributor

@joyeecheung PTAL. I guess it's ok to introduce rang as a dependency, right?

@Drieger

Drieger commented Sep 19, 2018

Copy link
Copy Markdown
Contributor Author

@mmarchini Just addressed last two comments.

@joyeecheung

Copy link
Copy Markdown
Member

@mmarchini Won't be able to take a look at this until the weekend, but having a in-tree dependency in the public domain doesn't seem to a problem from me.

@mmarchini

Copy link
Copy Markdown
Contributor

@joyeecheung no worries! There's no rush in landing this, so if you want you can take a look when you have the time :)

@Drieger can you please rebase this? There are some conflicts after #227 landed.

To make visualization easier, objects types, properties and addresses
will be colorized. Using `rang` library color pallete, the current
definition is:
* cyan for addresses
* magenta for objects being inspected
* yellow for types
* bold yellow for objects properties

Fixes: nodejs#179

Colorize findrefs output
Allow users to select if color output should be on or off. Default
is auto, which verifies if current output is a tty and has color
support.

Colorize detailed output
@Drieger

Drieger commented Sep 27, 2018

Copy link
Copy Markdown
Contributor Author

@mmarchini Conflicts solved

mmarchini pushed a commit that referenced this pull request Oct 5, 2018
To make visualization easier, objects types, properties and addresses
will be colorized. Using `rang` library color pallete, the current
definition is:
* cyan for addresses
* magenta for objects being inspected
* yellow for types
* bold yellow for objects properties

Fixes: #179

Colorize findrefs output

PR-URL: #225
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
@mmarchini

Copy link
Copy Markdown
Contributor

Landed in 7b09c15, thank you!

@mmarchini mmarchini closed this Oct 5, 2018
hyj1991 pushed a commit to aliyun-node/llnode that referenced this pull request Oct 11, 2018
To make visualization easier, objects types, properties and addresses
will be colorized. Using `rang` library color pallete, the current
definition is:
* cyan for addresses
* magenta for objects being inspected
* yellow for types
* bold yellow for objects properties

Fixes: nodejs#179

Colorize findrefs output

PR-URL: nodejs#225
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants