MultiLoggerConfig.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */

  20. package org.openspcoop2.utils.logger.config;

  21. import org.openspcoop2.utils.logger.constants.Severity;

  22. /**
  23.  * MultiLoggerConfig
  24.  *
  25.  * @author Poli Andrea (apoli@link.it)
  26.  * @author $Author$
  27.  * @version $Rev$, $Date$
  28.  */
  29. public class MultiLoggerConfig {

  30.     private boolean log4jLoggerEnabled = true;
  31.     private boolean dbLoggerEnabled = false;
  32.    
  33.     private Severity diagnosticSeverityFilter = Severity.INFO;
  34.     private Severity eventSeverityFilter = Severity.INFO;
  35.    
  36.     private DiagnosticConfig diagnosticConfig;
  37.    
  38.     private Log4jConfig log4jConfig;
  39.    
  40.     private DatabaseConfig databaseConfig;
  41.    
  42.    
  43.     public boolean isLog4jLoggerEnabled() {
  44.         return this.log4jLoggerEnabled;
  45.     }

  46.     public void setLog4jLoggerEnabled(boolean log4jLoggerEnabled) {
  47.         this.log4jLoggerEnabled = log4jLoggerEnabled;
  48.     }

  49.     public boolean isDbLoggerEnabled() {
  50.         return this.dbLoggerEnabled;
  51.     }

  52.     public void setDbLoggerEnabled(boolean dbLoggerEnabled) {
  53.         this.dbLoggerEnabled = dbLoggerEnabled;
  54.     }

  55.     public Severity getDiagnosticSeverityFilter() {
  56.         return this.diagnosticSeverityFilter;
  57.     }

  58.     public void setDiagnosticSeverityFilter(Severity diagnosticSeverityFilter) {
  59.         this.diagnosticSeverityFilter = diagnosticSeverityFilter;
  60.     }

  61.     public Severity getEventSeverityFilter() {
  62.         return this.eventSeverityFilter;
  63.     }

  64.     public void setEventSeverityFilter(Severity eventSeverityFilter) {
  65.         this.eventSeverityFilter = eventSeverityFilter;
  66.     }
  67.    
  68.     public DiagnosticConfig getDiagnosticConfig() {
  69.         return this.diagnosticConfig;
  70.     }

  71.     public void setDiagnosticConfig(DiagnosticConfig diagnosticConfig) {
  72.         this.diagnosticConfig = diagnosticConfig;
  73.     }

  74.     public Log4jConfig getLog4jConfig() {
  75.         return this.log4jConfig;
  76.     }

  77.     public void setLog4jConfig(Log4jConfig log4jConfig) {
  78.         this.log4jConfig = log4jConfig;
  79.     }

  80.     public DatabaseConfig getDatabaseConfig() {
  81.         return this.databaseConfig;
  82.     }

  83.     public void setDatabaseConfig(DatabaseConfig databaseConfig) {
  84.         this.databaseConfig = databaseConfig;
  85.     }
  86. }