src/app/shared/pipes/log-priority.pipe.ts
Name | logPriority |
transform | ||||||
transform(value: any)
|
||||||
Defined in src/app/shared/pipes/log-priority.pipe.ts:7
|
||||||
Parameters :
Returns :
any
|
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'logPriority'
})
export class LogPriorityPipe implements PipeTransform {
transform(value: any): any {
if (value === '[INF]') {
return 'info';
} else if (value === '[WRN]') {
return 'warn';
} else if (value === '[ERR]') {
return 'err';
} else {
return ''; // Inherit
}
}
}