Logs: Added support for numeric log levels (#87366)

* logs: add support for numeric loglevels

* Log types: add a numeric level map to LogLevel

* getLogLevelFromKey: adapt to support numeric levels

* Formatting

* getLogLevelFromKey: accept strings or numbers

---------

Co-authored-by: Matias Chomicki <matyax@gmail.com>
This commit is contained in:
Dmitry Bashkatov
2024-06-05 13:56:36 +02:00
committed by GitHub
co-authored by Matias Chomicki
parent f262880b68
commit 17525ad43f
5 changed files with 61 additions and 12 deletions
+9 -9
View File
@@ -92,15 +92,15 @@ For the logs where a `level` label is specified, we use the value of this label
**Supported log levels and mapping of log level abbreviation and expressions:**
| Log level | Color | Supported expressions |
| :-------- | :--------- | ---------------------------------------- |
| critical | purple | emerg, fatal, alert, crit, critical |
| error | red | err, eror, error |
| warning | yellow | warn, warning |
| info | green | info, information, informational, notice |
| debug | blue | dbug, debug |
| trace | light blue | trace |
| unknown | grey | \* |
| Log level | Color | Supported expressions |
| :-------- | :--------- | ---------------------------------------------- |
| critical | purple | emerg, fatal, alert, crit, critical, 0, 1, 2 |
| error | red | err, eror, error, 3 |
| warning | yellow | warn, warning, 4 |
| info | green | info, information, informational, notice, 5, 6 |
| debug | blue | dbug, debug, 7 |
| trace | light blue | trace |
| unknown | grey | \* |
### Highlight searched words