@Override public int decide(LoggingEvent ev) { OperationLog log = operationManager.getOperationLogByThread(); boolean excludeMatches = (loggingMode == OperationLog.LoggingLevel.VERBOSE); if (log == null) { return Filter.DENY; } OperationLog.LoggingLevel currentLoggingMode = log.getOpLoggingLevel(); // If logging is disabled, deny everything. if (currentLoggingMode == OperationLog.LoggingLevel.NONE) { return Filter.DENY; } // Look at the current session's setting // and set the pattern and excludeMatches accordingly. if (currentLoggingMode != loggingMode) { loggingMode = currentLoggingMode; setCurrentNamePattern(loggingMode); } boolean isMatch = namePattern.matcher(ev.getLoggerName()).matches(); if (excludeMatches == isMatch) { // Deny if this is black-list filter (excludeMatches = true) and it // matched // or if this is whitelist filter and it didn't match return Filter.DENY; } return Filter.NEUTRAL; } }
@Override public int decide(LoggingEvent ev) { OperationLog log = operationManager.getOperationLogByThread(); boolean excludeMatches = (loggingMode == OperationLog.LoggingLevel.VERBOSE); if (log == null) { return Filter.DENY; } OperationLog.LoggingLevel currentLoggingMode = log.getOpLoggingLevel(); // If logging is disabled, deny everything. if (currentLoggingMode == OperationLog.LoggingLevel.NONE) { return Filter.DENY; } // Look at the current session's setting // and set the pattern and excludeMatches accordingly. if (currentLoggingMode != loggingMode) { loggingMode = currentLoggingMode; setCurrentNamePattern(loggingMode); } boolean isMatch = namePattern.matcher(ev.getLoggerName()).matches(); if (excludeMatches == isMatch) { // Deny if this is black-list filter (excludeMatches = true) and it // matched // or if this is whitelist filter and it didn't match return Filter.DENY; } return Filter.NEUTRAL; } }
@Override public int decide(LoggingEvent ev) { OperationLog log = operationManager.getOperationLogByThread(); boolean excludeMatches = (loggingMode == OperationLog.LoggingLevel.VERBOSE); if (log == null) { return Filter.DENY; } OperationLog.LoggingLevel currentLoggingMode = log.getOpLoggingLevel(); // If logging is disabled, deny everything. if (currentLoggingMode == OperationLog.LoggingLevel.NONE) { return Filter.DENY; } // Look at the current session's setting // and set the pattern and excludeMatches accordingly. if (currentLoggingMode != loggingMode) { loggingMode = currentLoggingMode; setCurrentNamePattern(loggingMode); } boolean isMatch = namePattern.matcher(ev.getLoggerName()).matches(); if (excludeMatches == isMatch) { // Deny if this is black-list filter (excludeMatches = true) and it // matched // or if this is whitelist filter and it didn't match return Filter.DENY; } return Filter.NEUTRAL; } }
@Override public int decide(LoggingEvent ev) { OperationLog log = operationManager.getOperationLogByThread(); boolean excludeMatches = (loggingMode == OperationLog.LoggingLevel.VERBOSE); if (log == null) { return Filter.DENY; } OperationLog.LoggingLevel currentLoggingMode = log.getOpLoggingLevel(); // If logging is disabled, deny everything. if (currentLoggingMode == OperationLog.LoggingLevel.NONE) { return Filter.DENY; } // Look at the current session's setting // and set the pattern and excludeMatches accordingly. if (currentLoggingMode != loggingMode) { loggingMode = currentLoggingMode; setCurrentNamePattern(loggingMode); } boolean isMatch = namePattern.matcher(ev.getLoggerName()).matches(); if (excludeMatches == isMatch) { // Deny if this is black-list filter (excludeMatches = true) and it // matched // or if this is whitelist filter and it didn't match return Filter.DENY; } return Filter.NEUTRAL; } }
public NameFilter( OperationLog.LoggingLevel loggingMode, OperationManager op) { this.operationManager = op; this.loggingMode = loggingMode; setCurrentNamePattern(loggingMode); }
public LogDivertAppender(OperationManager operationManager, OperationLog.LoggingLevel loggingMode) { isVerbose = (loggingMode == OperationLog.LoggingLevel.VERBOSE); initLayout(isVerbose); setWriter(writer); setName("LogDivertAppender"); this.operationManager = operationManager; this.verboseLayout = isVerbose ? layout : CLIServiceUtils.verboseLayout; addFilter(new NameFilter(loggingMode, operationManager)); }
public LogDivertAppender(OperationManager operationManager, OperationLog.LoggingLevel loggingMode) { isVerbose = (loggingMode == OperationLog.LoggingLevel.VERBOSE); initLayout(isVerbose); setWriter(writer); setName("LogDivertAppender"); this.operationManager = operationManager; this.verboseLayout = isVerbose ? layout : CLIServiceUtils.verboseLayout; addFilter(new NameFilter(loggingMode, operationManager)); }
NameFilter( OperationLog.LoggingLevel loggingMode, OperationManager op) { this.operationManager = op; this.loggingMode = loggingMode; setCurrentNamePattern(loggingMode); }
public NameFilter( OperationLog.LoggingLevel loggingMode, OperationManager op) { this.operationManager = op; this.loggingMode = loggingMode; setCurrentNamePattern(loggingMode); }
public LogDivertAppender(OperationManager operationManager, OperationLog.LoggingLevel loggingMode) { isVerbose = (loggingMode == OperationLog.LoggingLevel.VERBOSE); initLayout(isVerbose); setWriter(writer); setName("LogDivertAppender"); this.operationManager = operationManager; this.verboseLayout = isVerbose ? layout : CLIServiceUtils.verboseLayout; addFilter(new NameFilter(loggingMode, operationManager)); }
public LogDivertAppender(OperationManager operationManager, OperationLog.LoggingLevel loggingMode) { isVerbose = (loggingMode == OperationLog.LoggingLevel.VERBOSE); initLayout(isVerbose); setWriter(writer); setName("LogDivertAppender"); this.operationManager = operationManager; this.verboseLayout = isVerbose ? layout : CLIServiceUtils.verboseLayout; addFilter(new NameFilter(loggingMode, operationManager)); }
NameFilter( OperationLog.LoggingLevel loggingMode, OperationManager op) { this.operationManager = op; this.loggingMode = loggingMode; setCurrentNamePattern(loggingMode); }