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:
Máté FARKAS 2023-04-06 13:45:45 +02:00 committed by GitHub
parent bcdb9bf5b4
commit 5518ffd248
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -376,7 +376,7 @@ export def "log warning" [message: string] {
export def "log info" [message: string] { export def "log info" [message: string] {
if (current-log-level) > (INFO_LEVEL) { return } 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 # Log debug message
export def "log debug" [message: string] { export def "log debug" [message: string] {

View File

@ -37,3 +37,10 @@ export def test_debug [] {
assert no message INFO debug assert no message INFO debug
assert message DEBUG debug DBG 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"
}