From 1317af5522242e0ddba1c5a81ff99e35c2ec424d Mon Sep 17 00:00:00 2001 From: RakhithaRR Date: Fri, 11 Oct 2024 11:30:38 +0530 Subject: [PATCH] Improve test flows --- .../ElkAnalytics/log4j2.properties | 26 +++++++++++++++++-- .../applicationSharing/deployment.toml | 3 +++ .../AM/configFiles/common/deployment.toml | 3 --- .../logAnalyticsEnabled/log4j2.properties | 26 +++++++++++++++++-- .../AM/lifecycletest/log4j2.properties | 26 +++++++++++++++++-- .../src/test/resources/testng.xml | 2 +- .../AM/lifecycletest/log4j2.properties | 26 +++++++++++++++++-- 7 files changed, 100 insertions(+), 12 deletions(-) diff --git a/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/ElkAnalytics/log4j2.properties b/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/ElkAnalytics/log4j2.properties index 75e10c451b..eca63e4b12 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/ElkAnalytics/log4j2.properties +++ b/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/ElkAnalytics/log4j2.properties @@ -1,6 +1,6 @@ # list of all appenders #add entry "syslog" to use the syslog appender -appenders=APIM_METRICS_APPENDER, CARBON_CONSOLE, CARBON_LOGFILE, AUDIT_LOGFILE, ATOMIKOS_LOGFILE, CARBON_TRACE_LOGFILE, ERROR_LOGFILE, OPEN_TRACING,SERVICE_APPENDER, TRACE_APPENDER, osgi, CORRELATION, BOTDATA_APPENDER, API_LOGFILE +appenders=APIM_METRICS_APPENDER, CARBON_CONSOLE, CARBON_LOGFILE, AUDIT_LOGFILE, ATOMIKOS_LOGFILE, CARBON_TRACE_LOGFILE, ERROR_LOGFILE, OPEN_TRACING,SERVICE_APPENDER, TRACE_APPENDER, osgi, CORRELATION, BOTDATA_APPENDER, API_LOGFILE, APIM_GATEWAY_ACCESS_APPENDER #, syslog # CARBON_CONSOLE is set to be a ConsoleAppender using a PatternLayout. @@ -196,11 +196,28 @@ appender.SERVICE_APPENDER.policies.size.size=1000KB appender.SERVICE_APPENDER.strategy.type = DefaultRolloverStrategy appender.SERVICE_APPENDER.strategy.max = 10 +appender.APIM_GATEWAY_ACCESS_APPENDER.type = RollingFile +appender.APIM_GATEWAY_ACCESS_APPENDER.name = APIM_GATEWAY_ACCESS_APPENDER +appender.APIM_GATEWAY_ACCESS_APPENDER.fileName = ${sys:carbon.home}/repository/logs/http_access.log +appender.APIM_GATEWAY_ACCESS_APPENDER.filePattern = ${sys:carbon.home}/repository/logs/http_access_%d{MM-dd-yyyy}-%i.log +appender.APIM_GATEWAY_ACCESS_APPENDER.layout.type = PatternLayout +appender.APIM_GATEWAY_ACCESS_APPENDER.layout.pattern = %msg%n +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.type = Policies +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.time.type = TimeBasedTriggeringPolicy +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.time.interval = 1 +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.time.modulate = true +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.size.type = SizeBasedTriggeringPolicy +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.size.size=1000MB +appender.APIM_GATEWAY_ACCESS_APPENDER.strategy.type = DefaultRolloverStrategy +appender.APIM_GATEWAY_ACCESS_APPENDER.strategy.max = 10 +appender.APIM_GATEWAY_ACCESS_APPENDER.filter.threshold.type = ThresholdFilter +appender.APIM_GATEWAY_ACCESS_APPENDER.filter.threshold.level = DEBUG + appender.osgi.type = PaxOsgi appender.osgi.name = PaxOsgi appender.osgi.filter = * -loggers = reporter, AUDIT_LOG, trace-messages, org-apache-coyote, com-hazelcast, Owasp-CsrfGuard, org-apache-axis2-wsdl-codegen-writer-PrettyPrinter, org-apache-axis2-clustering, org-apache-catalina, org-apache-tomcat, org-wso2-carbon-apacheds, org-apache-directory-server-ldap, org-apache-directory-server-core-event, com-atomikos, org-quartz, org-apache-jackrabbit-webdav, org-apache-juddi, org-apache-commons-digester-Digester, org-apache-jasper-compiler-TldLocationsCache, org-apache-qpid, org-apache-qpid-server-Main, qpid-message, qpid-message-broker-listening, org-apache-tiles, org-apache-commons-httpclient, org-apache-solr, me-prettyprint-cassandra-hector-TimingLogger, org-apache-axis-enterprise, org-apache-directory-shared-ldap, org-apache-directory-server-ldap-handlers, org-apache-directory-shared-ldap-entry-DefaultServerAttribute, org-apache-directory-server-core-DefaultDirectoryService, org-apache-directory-shared-ldap-ldif-LdifReader, org-apache-directory-server-ldap-LdapProtocolHandler, org-apache-directory-server-core, org-apache-directory-server-ldap-LdapSession, DataNucleus, Datastore, Datastore-Schema, JPOX-Datastore, JPOX-Plugin, JPOX-MetaData, JPOX-Query, JPOX-General, JPOX-Enhancer, org-apache-hadoop-hive, hive, ExecMapper, ExecReducer, net-sf-ehcache-config-ConfigurationFactory, axis2Deployment, equinox, tomcat2, StAXDialectDetector, trace, synapse, synapse_transport, axis2, axis2_transport, org-wso2-carbon, hunsicker, thrift-publisher, service_logger, trace_logger, org-wso2-carbon-apimgt-gateway-mediators-BotDetectionMediator, correlation, API_LOG +loggers = reporter, AUDIT_LOG, trace-messages, org-apache-coyote, com-hazelcast, Owasp-CsrfGuard, org-apache-axis2-wsdl-codegen-writer-PrettyPrinter, org-apache-axis2-clustering, org-apache-catalina, org-apache-tomcat, org-wso2-carbon-apacheds, org-apache-directory-server-ldap, org-apache-directory-server-core-event, com-atomikos, org-quartz, org-apache-jackrabbit-webdav, org-apache-juddi, org-apache-commons-digester-Digester, org-apache-jasper-compiler-TldLocationsCache, org-apache-qpid, org-apache-qpid-server-Main, qpid-message, qpid-message-broker-listening, org-apache-tiles, org-apache-commons-httpclient, org-apache-solr, me-prettyprint-cassandra-hector-TimingLogger, org-apache-axis-enterprise, org-apache-directory-shared-ldap, org-apache-directory-server-ldap-handlers, org-apache-directory-shared-ldap-entry-DefaultServerAttribute, org-apache-directory-server-core-DefaultDirectoryService, org-apache-directory-shared-ldap-ldif-LdifReader, org-apache-directory-server-ldap-LdapProtocolHandler, org-apache-directory-server-core, org-apache-directory-server-ldap-LdapSession, DataNucleus, Datastore, Datastore-Schema, JPOX-Datastore, JPOX-Plugin, JPOX-MetaData, JPOX-Query, JPOX-General, JPOX-Enhancer, org-apache-hadoop-hive, hive, ExecMapper, ExecReducer, net-sf-ehcache-config-ConfigurationFactory, axis2Deployment, equinox, tomcat2, StAXDialectDetector, trace, synapse, synapse_transport, axis2, axis2_transport, org-wso2-carbon, hunsicker, thrift-publisher, service_logger, trace_logger, org-wso2-carbon-apimgt-gateway-mediators-BotDetectionMediator, correlation, API_LOG, GatewayAccessLogger logger.API_LOG.name = API_LOG logger.API_LOG.level = INFO @@ -412,6 +429,11 @@ logger.trace.appenderRef.OPEN_TRACING.ref = OPEN_TRACING logger.synapse.name = org.apache.synapse logger.synapse.level = INFO +logger.GatewayAccessLogger.name = org.apache.synapse.transport.http.access.logs +logger.GatewayAccessLogger.level = DEBUG +logger.GatewayAccessLogger.appenderRef.APIM_GATEWAY_ACCESS_APPENDER.ref = APIM_GATEWAY_ACCESS_APPENDER +logger.GatewayAccessLogger.additivity = false + logger.synapse_transport.name = org.apache.synapse.transport logger.synapse_transport.level = INFO diff --git a/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/applicationSharing/deployment.toml b/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/applicationSharing/deployment.toml index 79df12cfdb..ac7ec30ef3 100755 --- a/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/applicationSharing/deployment.toml +++ b/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/applicationSharing/deployment.toml @@ -35,6 +35,9 @@ password = "wso2carbon" alias = "wso2carbon" key_password = "wso2carbon" +[apim.key_manager] +enable_lightweight_apikey_generation = false + [[apim.gateway.environment]] name = "Default" type = "hybrid" diff --git a/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/common/deployment.toml b/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/common/deployment.toml index d6dc579922..39ce9827f2 100755 --- a/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/common/deployment.toml +++ b/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/common/deployment.toml @@ -35,9 +35,6 @@ password = "wso2carbon" alias = "wso2carbon" key_password = "wso2carbon" -[apim.key_manager] -enable_lightweight_apikey_generation = false - [[apim.gateway.environment]] name = "Default" type = "hybrid" diff --git a/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/logAnalyticsEnabled/log4j2.properties b/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/logAnalyticsEnabled/log4j2.properties index a2005423fb..9bd521b739 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/logAnalyticsEnabled/log4j2.properties +++ b/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/configFiles/logAnalyticsEnabled/log4j2.properties @@ -1,7 +1,7 @@ # list of all appenders #add entry "syslog" to use the syslog appender appenders=APIM_METRICS_APPENDER, CARBON_CONSOLE, CARBON_LOGFILE, AUDIT_LOGFILE, ATOMIKOS_LOGFILE, \ - CARBON_TRACE_LOGFILE, ERROR_LOGFILE, OPEN_TRACING,SERVICE_APPENDER, TRACE_APPENDER, osgi, CORRELATION, BOTDATA_APPENDER, API_LOGFILE + CARBON_TRACE_LOGFILE, ERROR_LOGFILE, OPEN_TRACING,SERVICE_APPENDER, TRACE_APPENDER, osgi, CORRELATION, BOTDATA_APPENDER, API_LOGFILE, APIM_GATEWAY_ACCESS_APPENDER #, syslog appender.APIM_METRICS_APPENDER.type = RollingFile @@ -197,13 +197,30 @@ appender.SERVICE_APPENDER.policies.size.size=1000KB appender.SERVICE_APPENDER.strategy.type = DefaultRolloverStrategy appender.SERVICE_APPENDER.strategy.max = 10 +appender.APIM_GATEWAY_ACCESS_APPENDER.type = RollingFile +appender.APIM_GATEWAY_ACCESS_APPENDER.name = APIM_GATEWAY_ACCESS_APPENDER +appender.APIM_GATEWAY_ACCESS_APPENDER.fileName = ${sys:carbon.home}/repository/logs/http_access.log +appender.APIM_GATEWAY_ACCESS_APPENDER.filePattern = ${sys:carbon.home}/repository/logs/http_access_%d{MM-dd-yyyy}-%i.log +appender.APIM_GATEWAY_ACCESS_APPENDER.layout.type = PatternLayout +appender.APIM_GATEWAY_ACCESS_APPENDER.layout.pattern = %msg%n +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.type = Policies +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.time.type = TimeBasedTriggeringPolicy +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.time.interval = 1 +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.time.modulate = true +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.size.type = SizeBasedTriggeringPolicy +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.size.size=1000MB +appender.APIM_GATEWAY_ACCESS_APPENDER.strategy.type = DefaultRolloverStrategy +appender.APIM_GATEWAY_ACCESS_APPENDER.strategy.max = 10 +appender.APIM_GATEWAY_ACCESS_APPENDER.filter.threshold.type = ThresholdFilter +appender.APIM_GATEWAY_ACCESS_APPENDER.filter.threshold.level = DEBUG + appender.osgi.type = PaxOsgi appender.osgi.name = PaxOsgi appender.osgi.filter = * loggers = reporter, AUDIT_LOG, trace-messages, org-apache-coyote, com-hazelcast, Owasp-CsrfGuard, \ org-apache-axis2-wsdl-codegen-writer-PrettyPrinter, org-apache-axis2-clustering, org-apache-catalina, \ - org-apache-tomcat, org-wso2-carbon-apacheds, org-apache-directory-server-ldap, org-apache-directory-server-core-event, com-atomikos, org-quartz, org-apache-jackrabbit-webdav, org-apache-juddi, org-apache-commons-digester-Digester, org-apache-jasper-compiler-TldLocationsCache, org-apache-qpid, org-apache-qpid-server-Main, qpid-message, qpid-message-broker-listening, org-apache-tiles, org-apache-commons-httpclient, org-apache-solr, me-prettyprint-cassandra-hector-TimingLogger, org-apache-axis-enterprise, org-apache-directory-shared-ldap, org-apache-directory-server-ldap-handlers, org-apache-directory-shared-ldap-entry-DefaultServerAttribute, org-apache-directory-server-core-DefaultDirectoryService, org-apache-directory-shared-ldap-ldif-LdifReader, org-apache-directory-server-ldap-LdapProtocolHandler, org-apache-directory-server-core, org-apache-directory-server-ldap-LdapSession, DataNucleus, Datastore, Datastore-Schema, JPOX-Datastore, JPOX-Plugin, JPOX-MetaData, JPOX-Query, JPOX-General, JPOX-Enhancer, org-apache-hadoop-hive, hive, ExecMapper, ExecReducer, net-sf-ehcache-config-ConfigurationFactory, axis2Deployment, equinox, tomcat2, StAXDialectDetector, trace, synapse, synapse_transport, axis2, axis2_transport, org-wso2-carbon, hunsicker, thrift-publisher, service_logger, trace_logger, org-wso2-carbon-apimgt-gateway-mediators-BotDetectionMediator, correlation, API_LOG + org-apache-tomcat, org-wso2-carbon-apacheds, org-apache-directory-server-ldap, org-apache-directory-server-core-event, com-atomikos, org-quartz, org-apache-jackrabbit-webdav, org-apache-juddi, org-apache-commons-digester-Digester, org-apache-jasper-compiler-TldLocationsCache, org-apache-qpid, org-apache-qpid-server-Main, qpid-message, qpid-message-broker-listening, org-apache-tiles, org-apache-commons-httpclient, org-apache-solr, me-prettyprint-cassandra-hector-TimingLogger, org-apache-axis-enterprise, org-apache-directory-shared-ldap, org-apache-directory-server-ldap-handlers, org-apache-directory-shared-ldap-entry-DefaultServerAttribute, org-apache-directory-server-core-DefaultDirectoryService, org-apache-directory-shared-ldap-ldif-LdifReader, org-apache-directory-server-ldap-LdapProtocolHandler, org-apache-directory-server-core, org-apache-directory-server-ldap-LdapSession, DataNucleus, Datastore, Datastore-Schema, JPOX-Datastore, JPOX-Plugin, JPOX-MetaData, JPOX-Query, JPOX-General, JPOX-Enhancer, org-apache-hadoop-hive, hive, ExecMapper, ExecReducer, net-sf-ehcache-config-ConfigurationFactory, axis2Deployment, equinox, tomcat2, StAXDialectDetector, trace, synapse, synapse_transport, axis2, axis2_transport, org-wso2-carbon, hunsicker, thrift-publisher, service_logger, trace_logger, org-wso2-carbon-apimgt-gateway-mediators-BotDetectionMediator, correlation, API_LOG, GatewayAccessLogger logger.reporter.name = org.wso2.am.analytics.publisher.reporter.elk logger.reporter.level = INFO @@ -416,6 +433,11 @@ logger.trace.appenderRef.OPEN_TRACING.ref = OPEN_TRACING logger.synapse.name = org.apache.synapse logger.synapse.level = INFO +logger.GatewayAccessLogger.name = org.apache.synapse.transport.http.access.logs +logger.GatewayAccessLogger.level = DEBUG +logger.GatewayAccessLogger.appenderRef.APIM_GATEWAY_ACCESS_APPENDER.ref = APIM_GATEWAY_ACCESS_APPENDER +logger.GatewayAccessLogger.additivity = false + logger.synapse_transport.name = org.apache.synapse.transport logger.synapse_transport.level = INFO diff --git a/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/lifecycletest/log4j2.properties b/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/lifecycletest/log4j2.properties index ee465c2f3b..8eae22170b 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/lifecycletest/log4j2.properties +++ b/modules/integration/tests-integration/tests-backend/src/test/resources/artifacts/AM/lifecycletest/log4j2.properties @@ -1,6 +1,6 @@ # list of all appenders #add entry "syslog" to use the syslog appender -appenders=CARBON_CONSOLE, CARBON_LOGFILE, AUDIT_LOGFILE, ATOMIKOS_LOGFILE, CARBON_TRACE_LOGFILE, ERROR_LOGFILE, OPEN_TRACING,SERVICE_APPENDER, TRACE_APPENDER, osgi, CORRELATION, BOTDATA_APPENDER, API_LOGFILE +appenders=CARBON_CONSOLE, CARBON_LOGFILE, AUDIT_LOGFILE, ATOMIKOS_LOGFILE, CARBON_TRACE_LOGFILE, ERROR_LOGFILE, OPEN_TRACING,SERVICE_APPENDER, TRACE_APPENDER, osgi, CORRELATION, BOTDATA_APPENDER, API_LOGFILE, APIM_GATEWAY_ACCESS_APPENDER #, syslog # CARBON_CONSOLE is set to be a ConsoleAppender using a PatternLayout. @@ -181,11 +181,28 @@ appender.SERVICE_APPENDER.policies.size.size=1000KB appender.SERVICE_APPENDER.strategy.type = DefaultRolloverStrategy appender.SERVICE_APPENDER.strategy.max = 10 +appender.APIM_GATEWAY_ACCESS_APPENDER.type = RollingFile +appender.APIM_GATEWAY_ACCESS_APPENDER.name = APIM_GATEWAY_ACCESS_APPENDER +appender.APIM_GATEWAY_ACCESS_APPENDER.fileName = ${sys:carbon.home}/repository/logs/http_access.log +appender.APIM_GATEWAY_ACCESS_APPENDER.filePattern = ${sys:carbon.home}/repository/logs/http_access_%d{MM-dd-yyyy}-%i.log +appender.APIM_GATEWAY_ACCESS_APPENDER.layout.type = PatternLayout +appender.APIM_GATEWAY_ACCESS_APPENDER.layout.pattern = %msg%n +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.type = Policies +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.time.type = TimeBasedTriggeringPolicy +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.time.interval = 1 +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.time.modulate = true +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.size.type = SizeBasedTriggeringPolicy +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.size.size=1000MB +appender.APIM_GATEWAY_ACCESS_APPENDER.strategy.type = DefaultRolloverStrategy +appender.APIM_GATEWAY_ACCESS_APPENDER.strategy.max = 10 +appender.APIM_GATEWAY_ACCESS_APPENDER.filter.threshold.type = ThresholdFilter +appender.APIM_GATEWAY_ACCESS_APPENDER.filter.threshold.level = DEBUG + appender.osgi.type = PaxOsgi appender.osgi.name = PaxOsgi appender.osgi.filter = * -loggers = AUDIT_LOG, trace-messages, org-apache-coyote, com-hazelcast, Owasp-CsrfGuard, org-apache-axis2-wsdl-codegen-writer-PrettyPrinter, org-apache-axis2-clustering, org-apache-catalina, org-apache-tomcat, org-wso2-carbon-apacheds, org-apache-directory-server-ldap, org-apache-directory-server-core-event, com-atomikos, org-quartz, org-apache-jackrabbit-webdav, org-apache-juddi, org-apache-commons-digester-Digester, org-apache-jasper-compiler-TldLocationsCache, org-apache-qpid, org-apache-qpid-server-Main, qpid-message, qpid-message-broker-listening, org-apache-tiles, org-apache-commons-httpclient, org-apache-solr, me-prettyprint-cassandra-hector-TimingLogger, org-apache-axis-enterprise, org-apache-directory-shared-ldap, org-apache-directory-server-ldap-handlers, org-apache-directory-shared-ldap-entry-DefaultServerAttribute, org-apache-directory-server-core-DefaultDirectoryService, org-apache-directory-shared-ldap-ldif-LdifReader, org-apache-directory-server-ldap-LdapProtocolHandler, org-apache-directory-server-core, org-apache-directory-server-ldap-LdapSession, DataNucleus, Datastore, Datastore-Schema, JPOX-Datastore, JPOX-Plugin, JPOX-MetaData, JPOX-Query, JPOX-General, JPOX-Enhancer, org-apache-hadoop-hive, hive, ExecMapper, ExecReducer, net-sf-ehcache-config-ConfigurationFactory, axis2Deployment, equinox, tomcat2, StAXDialectDetector, trace, synapse, synapse_transport, axis2, axis2_transport, org-wso2-carbon, hunsicker, thrift-publisher, service_logger, trace_logger, org-wso2-carbon-apimgt-gateway-mediators-BotDetectionMediator, correlation, JAGGERY_LOG, API_LOG, synapse-wire +loggers = AUDIT_LOG, trace-messages, org-apache-coyote, com-hazelcast, Owasp-CsrfGuard, org-apache-axis2-wsdl-codegen-writer-PrettyPrinter, org-apache-axis2-clustering, org-apache-catalina, org-apache-tomcat, org-wso2-carbon-apacheds, org-apache-directory-server-ldap, org-apache-directory-server-core-event, com-atomikos, org-quartz, org-apache-jackrabbit-webdav, org-apache-juddi, org-apache-commons-digester-Digester, org-apache-jasper-compiler-TldLocationsCache, org-apache-qpid, org-apache-qpid-server-Main, qpid-message, qpid-message-broker-listening, org-apache-tiles, org-apache-commons-httpclient, org-apache-solr, me-prettyprint-cassandra-hector-TimingLogger, org-apache-axis-enterprise, org-apache-directory-shared-ldap, org-apache-directory-server-ldap-handlers, org-apache-directory-shared-ldap-entry-DefaultServerAttribute, org-apache-directory-server-core-DefaultDirectoryService, org-apache-directory-shared-ldap-ldif-LdifReader, org-apache-directory-server-ldap-LdapProtocolHandler, org-apache-directory-server-core, org-apache-directory-server-ldap-LdapSession, DataNucleus, Datastore, Datastore-Schema, JPOX-Datastore, JPOX-Plugin, JPOX-MetaData, JPOX-Query, JPOX-General, JPOX-Enhancer, org-apache-hadoop-hive, hive, ExecMapper, ExecReducer, net-sf-ehcache-config-ConfigurationFactory, axis2Deployment, equinox, tomcat2, StAXDialectDetector, trace, synapse, synapse_transport, axis2, axis2_transport, org-wso2-carbon, hunsicker, thrift-publisher, service_logger, trace_logger, org-wso2-carbon-apimgt-gateway-mediators-BotDetectionMediator, correlation, JAGGERY_LOG, API_LOG, synapse-wire, GatewayAccessLogger logger.API_LOG.name = API_LOG logger.API_LOG.level = INFO @@ -395,6 +412,11 @@ logger.trace.appenderRef.OPEN_TRACING.ref = OPEN_TRACING logger.synapse.name = org.apache.synapse logger.synapse.level = INFO +logger.GatewayAccessLogger.name = org.apache.synapse.transport.http.access.logs +logger.GatewayAccessLogger.level = DEBUG +logger.GatewayAccessLogger.appenderRef.APIM_GATEWAY_ACCESS_APPENDER.ref = APIM_GATEWAY_ACCESS_APPENDER +logger.GatewayAccessLogger.additivity = false + logger.synapse_transport.name = org.apache.synapse.transport logger.synapse_transport.level = INFO diff --git a/modules/integration/tests-integration/tests-backend/src/test/resources/testng.xml b/modules/integration/tests-integration/tests-backend/src/test/resources/testng.xml index 21f0ddaae4..1d5b953712 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/resources/testng.xml +++ b/modules/integration/tests-integration/tests-backend/src/test/resources/testng.xml @@ -357,7 +357,6 @@ - @@ -376,6 +375,7 @@ + diff --git a/modules/integration/tests-integration/tests-restart/src/test/resources/artifacts/AM/lifecycletest/log4j2.properties b/modules/integration/tests-integration/tests-restart/src/test/resources/artifacts/AM/lifecycletest/log4j2.properties index ee465c2f3b..8eae22170b 100644 --- a/modules/integration/tests-integration/tests-restart/src/test/resources/artifacts/AM/lifecycletest/log4j2.properties +++ b/modules/integration/tests-integration/tests-restart/src/test/resources/artifacts/AM/lifecycletest/log4j2.properties @@ -1,6 +1,6 @@ # list of all appenders #add entry "syslog" to use the syslog appender -appenders=CARBON_CONSOLE, CARBON_LOGFILE, AUDIT_LOGFILE, ATOMIKOS_LOGFILE, CARBON_TRACE_LOGFILE, ERROR_LOGFILE, OPEN_TRACING,SERVICE_APPENDER, TRACE_APPENDER, osgi, CORRELATION, BOTDATA_APPENDER, API_LOGFILE +appenders=CARBON_CONSOLE, CARBON_LOGFILE, AUDIT_LOGFILE, ATOMIKOS_LOGFILE, CARBON_TRACE_LOGFILE, ERROR_LOGFILE, OPEN_TRACING,SERVICE_APPENDER, TRACE_APPENDER, osgi, CORRELATION, BOTDATA_APPENDER, API_LOGFILE, APIM_GATEWAY_ACCESS_APPENDER #, syslog # CARBON_CONSOLE is set to be a ConsoleAppender using a PatternLayout. @@ -181,11 +181,28 @@ appender.SERVICE_APPENDER.policies.size.size=1000KB appender.SERVICE_APPENDER.strategy.type = DefaultRolloverStrategy appender.SERVICE_APPENDER.strategy.max = 10 +appender.APIM_GATEWAY_ACCESS_APPENDER.type = RollingFile +appender.APIM_GATEWAY_ACCESS_APPENDER.name = APIM_GATEWAY_ACCESS_APPENDER +appender.APIM_GATEWAY_ACCESS_APPENDER.fileName = ${sys:carbon.home}/repository/logs/http_access.log +appender.APIM_GATEWAY_ACCESS_APPENDER.filePattern = ${sys:carbon.home}/repository/logs/http_access_%d{MM-dd-yyyy}-%i.log +appender.APIM_GATEWAY_ACCESS_APPENDER.layout.type = PatternLayout +appender.APIM_GATEWAY_ACCESS_APPENDER.layout.pattern = %msg%n +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.type = Policies +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.time.type = TimeBasedTriggeringPolicy +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.time.interval = 1 +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.time.modulate = true +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.size.type = SizeBasedTriggeringPolicy +appender.APIM_GATEWAY_ACCESS_APPENDER.policies.size.size=1000MB +appender.APIM_GATEWAY_ACCESS_APPENDER.strategy.type = DefaultRolloverStrategy +appender.APIM_GATEWAY_ACCESS_APPENDER.strategy.max = 10 +appender.APIM_GATEWAY_ACCESS_APPENDER.filter.threshold.type = ThresholdFilter +appender.APIM_GATEWAY_ACCESS_APPENDER.filter.threshold.level = DEBUG + appender.osgi.type = PaxOsgi appender.osgi.name = PaxOsgi appender.osgi.filter = * -loggers = AUDIT_LOG, trace-messages, org-apache-coyote, com-hazelcast, Owasp-CsrfGuard, org-apache-axis2-wsdl-codegen-writer-PrettyPrinter, org-apache-axis2-clustering, org-apache-catalina, org-apache-tomcat, org-wso2-carbon-apacheds, org-apache-directory-server-ldap, org-apache-directory-server-core-event, com-atomikos, org-quartz, org-apache-jackrabbit-webdav, org-apache-juddi, org-apache-commons-digester-Digester, org-apache-jasper-compiler-TldLocationsCache, org-apache-qpid, org-apache-qpid-server-Main, qpid-message, qpid-message-broker-listening, org-apache-tiles, org-apache-commons-httpclient, org-apache-solr, me-prettyprint-cassandra-hector-TimingLogger, org-apache-axis-enterprise, org-apache-directory-shared-ldap, org-apache-directory-server-ldap-handlers, org-apache-directory-shared-ldap-entry-DefaultServerAttribute, org-apache-directory-server-core-DefaultDirectoryService, org-apache-directory-shared-ldap-ldif-LdifReader, org-apache-directory-server-ldap-LdapProtocolHandler, org-apache-directory-server-core, org-apache-directory-server-ldap-LdapSession, DataNucleus, Datastore, Datastore-Schema, JPOX-Datastore, JPOX-Plugin, JPOX-MetaData, JPOX-Query, JPOX-General, JPOX-Enhancer, org-apache-hadoop-hive, hive, ExecMapper, ExecReducer, net-sf-ehcache-config-ConfigurationFactory, axis2Deployment, equinox, tomcat2, StAXDialectDetector, trace, synapse, synapse_transport, axis2, axis2_transport, org-wso2-carbon, hunsicker, thrift-publisher, service_logger, trace_logger, org-wso2-carbon-apimgt-gateway-mediators-BotDetectionMediator, correlation, JAGGERY_LOG, API_LOG, synapse-wire +loggers = AUDIT_LOG, trace-messages, org-apache-coyote, com-hazelcast, Owasp-CsrfGuard, org-apache-axis2-wsdl-codegen-writer-PrettyPrinter, org-apache-axis2-clustering, org-apache-catalina, org-apache-tomcat, org-wso2-carbon-apacheds, org-apache-directory-server-ldap, org-apache-directory-server-core-event, com-atomikos, org-quartz, org-apache-jackrabbit-webdav, org-apache-juddi, org-apache-commons-digester-Digester, org-apache-jasper-compiler-TldLocationsCache, org-apache-qpid, org-apache-qpid-server-Main, qpid-message, qpid-message-broker-listening, org-apache-tiles, org-apache-commons-httpclient, org-apache-solr, me-prettyprint-cassandra-hector-TimingLogger, org-apache-axis-enterprise, org-apache-directory-shared-ldap, org-apache-directory-server-ldap-handlers, org-apache-directory-shared-ldap-entry-DefaultServerAttribute, org-apache-directory-server-core-DefaultDirectoryService, org-apache-directory-shared-ldap-ldif-LdifReader, org-apache-directory-server-ldap-LdapProtocolHandler, org-apache-directory-server-core, org-apache-directory-server-ldap-LdapSession, DataNucleus, Datastore, Datastore-Schema, JPOX-Datastore, JPOX-Plugin, JPOX-MetaData, JPOX-Query, JPOX-General, JPOX-Enhancer, org-apache-hadoop-hive, hive, ExecMapper, ExecReducer, net-sf-ehcache-config-ConfigurationFactory, axis2Deployment, equinox, tomcat2, StAXDialectDetector, trace, synapse, synapse_transport, axis2, axis2_transport, org-wso2-carbon, hunsicker, thrift-publisher, service_logger, trace_logger, org-wso2-carbon-apimgt-gateway-mediators-BotDetectionMediator, correlation, JAGGERY_LOG, API_LOG, synapse-wire, GatewayAccessLogger logger.API_LOG.name = API_LOG logger.API_LOG.level = INFO @@ -395,6 +412,11 @@ logger.trace.appenderRef.OPEN_TRACING.ref = OPEN_TRACING logger.synapse.name = org.apache.synapse logger.synapse.level = INFO +logger.GatewayAccessLogger.name = org.apache.synapse.transport.http.access.logs +logger.GatewayAccessLogger.level = DEBUG +logger.GatewayAccessLogger.appenderRef.APIM_GATEWAY_ACCESS_APPENDER.ref = APIM_GATEWAY_ACCESS_APPENDER +logger.GatewayAccessLogger.additivity = false + logger.synapse_transport.name = org.apache.synapse.transport logger.synapse_transport.level = INFO