Skip to content

Stdlib: use default color for info log level - #8766

Merged
fdncred merged 1 commit into
nushell:mainfrom
presidento:std-log-info
Apr 6, 2023
Merged

fdncred merged 1 commit into
nushell:mainfrom
presidento:std-log-info

Conversation

@presidento

Copy link
Copy Markdown
Contributor

To make it work with a light theme, as well. The dark theme is not affected, since the default color is white there.

Before

image

After

image

Also, I added back the example command to the test script which is very useful in these cases...

To make it working with light theme, as well.
Comment on lines +40 to +46
export def example [] {
log debug "Debug message"
log info "Info message"
log warning "Warning message"
log error "Error message"
log critical "Critical message"
} No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we want to keep this around in the tests?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Why not? This is the third time I had to add these calls to test logs. I think it is a good idea to have both automated (test_* commands) and manual tests (aka examples). But if you want, I can remove it, and type them again if I want to check how the log messages appear in my terminal.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah sounds good. Sometimes it is good to have something around for manual inspection (the actually useful printer test page). As long as we don't cause confusion in the main namespace I am happy.

Comment thread crates/nu-utils/standard_library/std.nu Resolved
@fdncred fdncred added the A:std-library Defining and improving the standard library written in Nu label Apr 6, 2023
@fdncred

fdncred commented Apr 6, 2023

Copy link
Copy Markdown
Contributor

Thanks

@fdncred
fdncred merged commit 5518ffd into nushell:main Apr 6, 2023
@presidento
presidento deleted the std-log-info branch April 6, 2023 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A:std-library Defining and improving the standard library written in Nu

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants