mirror of
https://github.com/nushell/nushell
synced 2024-12-26 13:03:07 +00:00
Stdlib: use default color for info log level (#8766)
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](https://user-images.githubusercontent.com/282320/230329663-6fae7b7d-7062-459c-ad80-8da3a243d606.png) ## After ![image](https://user-images.githubusercontent.com/282320/230329784-c40bf93e-0740-4b87-ae19-84fd7983898a.png) Also, I added back the example command to the test script which is very useful in these cases... Co-authored-by: Mate Farkas <Mate.Farkas@oneidentity.com>
This commit is contained in:
parent
bcdb9bf5b4
commit
5518ffd248
2 changed files with 8 additions and 1 deletions
|
@ -376,7 +376,7 @@ export def "log warning" [message: string] {
|
|||
export def "log info" [message: string] {
|
||||
if (current-log-level) > (INFO_LEVEL) { return }
|
||||
|
||||
print --stderr $"(ansi white)INF|(now)|($message)(ansi reset)"
|
||||
print --stderr $"(ansi default)INF|(now)|($message)(ansi reset)"
|
||||
}
|
||||
# Log debug message
|
||||
export def "log debug" [message: string] {
|
||||
|
|
|
@ -37,3 +37,10 @@ export def test_debug [] {
|
|||
assert no message INFO debug
|
||||
assert message DEBUG debug DBG
|
||||
}
|
||||
export def example [] {
|
||||
log debug "Debug message"
|
||||
log info "Info message"
|
||||
log warning "Warning message"
|
||||
log error "Error message"
|
||||
log critical "Critical message"
|
||||
}
|
Loading…
Reference in a new issue