Logs: Add log level Fatal (#24185)

- recognizes log levels "fatal" and "information"
- renders "fatal" with same color as other levels similar to "critical"
pull/24244/head
David 5 years ago committed by GitHub
parent 4f5ce48b2a
commit 9e06f9c402
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/grafana-data/src/types/logs.ts
  2. 2
      packages/grafana-data/src/utils/logs.test.ts

@ -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',

@ -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', () => {

Loading…
Cancel
Save