Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colourise Redirected Output #240

Merged
merged 3 commits into from
May 27, 2022
Merged

Colourise Redirected Output #240

merged 3 commits into from
May 27, 2022

Conversation

damianpowell
Copy link
Contributor

@damianpowell damianpowell commented May 27, 2022

Allow redirected output to be colourised using ANSI control codes. Option is enabled by the --force-color command line switch, or by setting output.forceColor to True in SeqCli.json. Addresses issue #239.

In PowerShell, the following should produce colorised output (if your console supports it) where previously it would not:

gc logfile.clef | seqcli print --force-color | %{ $_ }

The value of the --no-color switch (or output.disableColor setting) will take precedence. If either one is specified, --force-color will be ignored.

Initially used the ANSI version of the Literate theme but it looked horrible so I switched to the Code theme.

@nblumhardt
Copy link
Member

Looks great, thanks Damian!

I might look into making the default theme AnsiConsoleTheme.Code across the board (or build an ANSI theme based on Seq's typical palette)....

@nblumhardt nblumhardt merged commit f1024b9 into datalust:dev May 27, 2022
@damianpowell
Copy link
Contributor Author

You're welcome!

Yeah, the Seq palette is much more eye-friendly.

@liammclennan liammclennan mentioned this pull request Jul 12, 2022
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.

2 participants