Logs: Add log level Fatal (#24185)

- recognizes log levels "fatal" and "information"
- renders "fatal" with same color as other levels similar to "critical"
This commit is contained in:
David 2020-05-04 18:17:31 +02:00 committed by GitHub
parent 4f5ce48b2a
commit 9e06f9c402
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import { DataFrame } from './dataFrame';
*/
export enum LogLevel {
emerg = 'critical',
fatal = 'critical',
alert = 'critical',
crit = 'critical',
critical = 'critical',
@ -17,6 +18,7 @@ export enum LogLevel {
eror = 'error',
error = 'error',
info = 'info',
information = 'info',
notice = 'info',
dbug = 'debug',
debug = 'debug',

View File

@ -15,7 +15,7 @@ describe('getLoglevel()', () => {
});
it('returns no log level on when level is part of a word', () => {
expect(getLogLevel('this is information')).toBe(LogLevel.unknown);
expect(getLogLevel('who warns us')).toBe(LogLevel.unknown);
});
it('returns same log level for long and short version', () => {