RED-3800 safari regex fix
This commit is contained in:
parent
2642d9b8cd
commit
e896e01665
@ -6,10 +6,12 @@ import { ILoggerConfig } from '@red/domain';
|
||||
export class LoggerRulesService extends NGXLoggerRulesService {
|
||||
shouldCallWriter(level: NgxLoggerLevel, config: ILoggerConfig, message?: unknown, additional?: unknown[]): boolean {
|
||||
if (message && typeof message === 'string') {
|
||||
const matches = message.match('(?<=\\[)(.*?)(?=\\])');
|
||||
const matches = message.match('\\[(.*?)\\]');
|
||||
|
||||
if (matches && matches.length > 0 && config.features[matches[0]]) {
|
||||
const featureConfig = config.features[matches[0]];
|
||||
const firstMatch = matches[1]?.toUpperCase();
|
||||
|
||||
if (matches && matches.length > 0 && config.features[firstMatch]) {
|
||||
const featureConfig = config.features[firstMatch];
|
||||
|
||||
if (!featureConfig.enabled || (featureConfig.level && featureConfig?.level < config.level)) {
|
||||
return false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user