diff options
author | O'Connor, Lina (lo8949) <lo8949@us.att.com> | 2020-03-11 13:36:42 -0600 |
---|---|---|
committer | O'Connor, Lina (lo8949) <lo8949@us.att.com> | 2020-03-11 13:39:55 -0600 |
commit | e062d90200373473b21b42b8b5f0d8ae18155494 (patch) | |
tree | 1b7cee491f06c44c9d91420c40e271b99403c0cb /aai-els-onap-logging/src/test/resources | |
parent | ed992e01c17d5677dfa0e1d0a76a7f9bc12c2a90 (diff) |
Increase code coverage on aai-common: aai-els-onap-logging library
Added Junits
Issue-ID: AAI-2832
Change-Id: I68e11f67b4c16660707bc12de3c14df15145b2b7
Signed-off-by: O'Connor, Lina (lo8949) <lo8949@us.att.com>
Diffstat (limited to 'aai-els-onap-logging/src/test/resources')
4 files changed, 377 insertions, 0 deletions
diff --git a/aai-els-onap-logging/src/test/resources/aaiconfig.properties b/aai-els-onap-logging/src/test/resources/aaiconfig.properties new file mode 100644 index 00000000..3162e3ae --- /dev/null +++ b/aai-els-onap-logging/src/test/resources/aaiconfig.properties @@ -0,0 +1,19 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# Copyright © 2017-18 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +aai.logging.maxStackTraceEntries=10 diff --git a/aai-els-onap-logging/src/test/resources/application.properties b/aai-els-onap-logging/src/test/resources/application.properties new file mode 100644 index 00000000..df8fd64d --- /dev/null +++ b/aai-els-onap-logging/src/test/resources/application.properties @@ -0,0 +1,29 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# Copyright © 2017-18 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +spring.application.name=AAI Microservice +server.port=8446 +server.local.startpath=/opt/app/aai +schema.version.list=v10,v11,v12,v13,v14,v15,v16,v17,v18,v19 +server.certs.location=certificates +server.ssl.key-store=keystore.jks +server.ssl.key-store.pkcs12=keystore.pkcs12 +server.ssl.trust-store=truststore.jks +schema.service.ssl.key-store=${server.local.startpath}/etc/auth/aai-client-cert.p12 +schema.service.ssl.trust-store=${server.local.startpath}/etc/auth/aai_keystore.jks + diff --git a/aai-els-onap-logging/src/test/resources/error.properties b/aai-els-onap-logging/src/test/resources/error.properties new file mode 100644 index 00000000..c1470dae --- /dev/null +++ b/aai-els-onap-logging/src/test/resources/error.properties @@ -0,0 +1,161 @@ +#------------------------------------------------------------------------------- ---------- +#Key=Disposition:Category:Severity:Error Code:HTTP ResponseCode:RESTError Code:Error Message +#------------------------------------------------------------------------------- ---------- +# General success +AAI_0000=0:0:INFO:0000:200:0000:Success:0 + +# health check success +AAI_0001=0:0:INFO:0001:200:0001:Success X-FromAppId=%1 X-TransactionId=%2:0 +AAI_0002=0:0:INFO:0002:200:0001:Successful health check:0 + +# Success with additional info +AAI_0003=0:3:INFO:0003:202:0003:Success with additional info performing %1 on %2. Added %3 with key %4:0 +AAI_0004=0:3:INFO:0004:202:0003:Added prerequisite object to db:0 + +#--- aairest: 3000-3299 +# svc errors +AAI_3000=5:2:INFO:3000:400:3000:Invalid input performing %1 on %2:300 +AAI_3001=5:6:INFO:3001:404:3001:Resource not found for %1 using id %2:300 +AAI_3002=5:1:WARN:3002:400:3002:Error writing output performing %1 on %2:300 +AAI_3003=5:1:WARN:3003:400:3003:Failed to make edge to missing target node of type %3 with keys %4 performing %1 on %2:400 +AAI_3005=5:6:WARN:3005:404:3001:Node cannot be directly accessed for read, must be accessed via ancestor(s):100 +AAI_3006=5:6:WARN:3006:404:3001:Node cannot be directly accessed for write, must be accessed via ancestor(s):100 +AAI_3007=5:6:INFO:3007:410:3007:This version (%1) of the API is retired, please migrate to %2:500 +AAI_3008=5:6:ERROR:3008:400:3008:URI is not encoded in UTF-8:300 +AAI_3009=5:6:WARN:3009:400:3009:Malformed URL:300 +AAI_3010=5:6:WARN:3010:400:3002:Cannot write via this URL:100 +AAI_3011=5:6:WARN:3011:400:3000:Unknown XML namespace used in payload:300 +AAI_3012=5:6:WARN:3012:400:3012:Unrecognized AAI function:300 +AAI_3013=5:6:WARN:3013:400:3013:Query payload missing required parameters %1:300 +AAI_3014=5:6:WARN:3014:400:3014:Query payload is invalid %1:300 +AAI_3015=5:6:INFO:3015:410:3015:The %1 capability is retired, please contact the A&AI SE team to identify a replacement query:500 +AAI_3016=5:6:INFO:3007:400:3016:Request uri is not valid, please check the version %1:500 +AAI_3017=5:6:INFO:3007:400:3016:Request uri is not valid, please check the uri %1:500 +AAI_3025=5:4:FATAL:3025:500:3025:Error connecting to Schema Service:400 +AAI_3026=5:4:FATAL:3026:500:3026:Error reading OXM from Schema Service:400 +AAI_3027=5:4:FATAL:3026:500:3026:Error reading EdgeRules from Schema Service:400 + +# pol errors +AAI_3100=5:1:WARN:3100:400:3100:Unsupported operation %1:300 +AAI_3101=5:1:WARN:3101:403:3101:Attempt by client %1 to execute API %2:100 +AAI_3102=5:1:WARN:3102:400:3102:Error parsing input performing %1 on %2:300 +AAI_3300=5:1:WARN:3300:403:3300:Unauthorized:100 +AAI_3301=5:1:WARN:3301:401:3301:Stale credentials:100 +AAI_3302=5:1:WARN:3302:401:3301:Not authenticated:100 +AAI_3303=5:1:WARN:3303:403:3300:Too many objects would be returned by this request, please refine your request and retry:500 + +#--- aaigen: 4000-4099 +AAI_4000=5:4:ERROR:4000:500:3002:Internal Error:900 +AAI_4001=5:4:FATAL:4001:500:3002:Configuration file not found:500 +AAI_4002=5:4:FATAL:4002:500:3002:Error reading Configuration file:500 +AAI_4003=5:4:ERROR:4003:500:3002:Error writing to log file:500 +AAI_4004=5:4:FATAL:4004:500:3002:Error reading/parsing the error properties file:500 +AAI_4005=5:4:FATAL:4005:500:3002:Missing or invalid configuration parameter:500 +AAI_4006=5:4:FATAL:4006:500:3002:Unexpected error in service:500 +AAI_4007=5:4:WARN:4007:500:3102:Input parsing error:500 +AAI_4008=5:4:ERROR:4008:500:3002:Output parsing error:500 +AAI_4009=4:0:WARN:4009:400:3000:Invalid X-FromAppId in header:300 +AAI_4010=4:0:WARN:4010:400:3000:Invalid X-TransactionId in header:300 +AAI_4011=5:4:ERROR:4011:500:3002:Missing data for REST error response:500 +AAI_4014=4:0:WARN:4014:400:3000:Invalid Accept header:300 +AAI_4015=4:0:WARN:4015:400:3000:You must provide at least one indexed property:400 +AAI_4016=4:0:WARN:4016:400:3000:The depth parameter must be a number or the string "all":300 +AAI_4017=5:2:INFO:4017:400:3000:Could not set property:300 +AAI_4018=5:2:WARN:4018:400:3000:Unable to convert the string to integer:500 +AAI_4019=4:0:WARN:4019:400:3000:Request failed due to violations:400 +AAI_4020=5:4:ERROR:4020:500:3000:Unknown exception to calling validation service:500 +AAI_4021=5:4:FATAL:3025:500:4021:Error connecting to Validation Service:400 + +#--- aaidbmap: 5102-5199 +AAI_5102=5:4:FATAL:5102:500:3002:Graph database is null after open:400 +AAI_5105=5:4:ERROR:5105:500:3002:Unexpected error reading/updating database:300 +AAI_5106=5:4:WARN:5106:404:3001:Node not found:300 +AAI_5107=5:2:WARN:5107:400:3000:Required information missing:300 +AAI_5108=5:2:WARN:5108:200:0:Unexpected information in request being ignored:300 + +#--- aaidbgen: 6101-6199 +AAI_6101=5:4:ERROR:6101:500:3002:null JanusGraph object passed:400 +AAI_6102=5:4:WARN:6102:400:3000:Passed-in property is not valid for this nodeType:400 +AAI_6103=5:4:WARN:6103:400:3000:Required Node-property not found in input data:400 +AAI_6104=5:4:WARN:6104:400:3000:Required Node-property was passed with no data:400 +AAI_6105=5:4:WARN:6105:400:3000:Node-Key-Property not defined in DbMaps:400 +AAI_6106=5:4:WARN:6106:400:3000:Passed-in property is not valid for this edgeType:400 +AAI_6107=5:4:WARN:6107:400:3000:Required Edge-property not found in input data:400 +AAI_6108=5:4:WARN:6108:400:3000:Required Edge-property was passed with no data:400 +AAI_6109=5:4:WARN:6109:400:3000:Bad dependent Node value:400 +AAI_6110=5:4:ERROR:6110:400:3100:Node cannot be deleted:500 +AAI_6111=5:4:WARN:6111:400:3000:JSON processing error:300 +AAI_6112=5:4:ERROR:6112:400:3000:More than one node found by getUniqueNode():400 +AAI_6114=5:4:INFO:6114:404:3001:Node Not Found:300 +AAI_6115=5:4:ERROR:6115:400:3000:Unrecognized NodeType:400 +AAI_6116=5:4:ERROR:6116:400:3000:Unrecognized Property:400 +AAI_6117=5:4:ERROR:6117:400:3000:Uniqueness constraint violated:400 +AAI_6118=5:4:WARN:6118:400:3000:Required Field not passed.:400 +AAI_6120=5:4:WARN:6120:400:3000:Bad Parameter Passed:300 +AAI_6121=5:4:ERROR:6121:400:3000:Problem with internal AAI reference data:400 +AAI_6122=5:4:ERROR:6122:400:3000:Data Set not complete in DB for this request:400 +AAI_6123=5:4:ERROR:6123:500:3000:Bad Data found by DataGrooming Tool - Investigate:300 +AAI_6124=5:4:ERROR:6124:500:3000:File read/write error:500 +AAI_6125=5:4:WARN:6125:500:3000:Problem Pulling Data Set:500 +AAI_6126=5:4:ERROR:6126:400:3000:Edge cannot be deleted:400 +AAI_6127=5:4:INFO:6127:404:3001:Edge Not Found:400 +AAI_6128=5:4:INFO:6128:500:3000:Unexpected error:900 +AAI_6129=5:4:INFO:6129:404:3003:Error making edge to target node:400 +AAI_6130=5:4:WARN:6130:412:3000:Precondition Required:300 +AAI_6131=5:4:WARN:6131:412:3000:Precondition Failed:300 +AAI_6132=5:4:WARN:6132:400:3000:Bad Model Definition:500 +AAI_6133=5:4:WARN:6133:400:3000:Bad Named Query Definition:500 +AAI_6134=5:4:ERROR:6134:500:6134:Could not persist transaction to storage back end. Exhausted retry amount:500 +AAI_6135=5:4:WARN:6135:412:3000:Resource version specified on create:300 +AAI_6136=5:4:ERROR:6136:400:3000:Object cannot hold multiple items:400 +AAI_6137=5:4:ERROR:6137:400:3000:Cannot perform writes on multiple vertices:400 +AAI_6138=5:4:ERROR:6138:400:3000:Cannot delete multiple vertices:400 +AAI_6139=5:4:ERROR:6139:404:3000:Attempted to add edge to vertex that does not exist:400 +AAI_6140=5:4:ERROR:6140:400:3000:Edge multiplicity violated:400 +AAI_6141=5:4:WARN:6141:400:3000:Please Refine Query:400 +AAI_6142=5:4:INFO:6142:400:3000:Retrying transaction:900 +AAI_6143=5:4:INFO:6143:400:3000:Ghost vertex found:400 +AAI_6144=5:4:WARN:6144:400:3000:Cycle found in graph:400 +AAI_6145=5:4:ERROR:6145:400:3000:Cannot create a nested/containment edge via relationship:400 +AAI_6146=5:4:ERROR:6146:400:3000:Ambiguous identity map found, use a URI instead:300 +AAI_6147=5:4:ERROR:6147:400:3000:Payload Limit Reached, reduce payload:300 +AAI_6148=5:4:ERROR:6148:400:3000:More than one node found %1:300 +AAI_6149=5:4:ERROR:6149:404:3000:No relationship was found:300 + +#--- aaicsvp: 7101-7199 +AAI_7101=5:4:ERROR:7101:500:3002:Unexpected error in CSV file processing:900 +AAI_7102=5:4:ERROR:7102:500:3002:Error in cleanup temporary directory:500 +AAI_7104=5:4:ERROR:7104:500:3002:Failed to create directory:500 +AAI_7105=5:4:ERROR:7105:500:3002:Temporary directory exists:500 +AAI_7106=5:4:ERROR:7106:500:3002:Cannot delete:500 +AAI_7107=5:4:ERROR:7107:500:3002:Input file does not exist:500 +AAI_7108=5:4:ERROR:7108:500:3002:Output file does not exist:500 +AAI_7109=5:4:ERROR:7109:500:3002:Error closing file:500 +AAI_7110=5:4:ERROR:7110:500:3002:Error loading/reading properties file:500 +AAI_7111=5:4:ERROR:7111:500:3002:Error executing shell script:900 +AAI_7112=5:4:ERROR:7112:500:3002:Error creating output file:500 +AAI_7113=5:4:ERROR:7113:500:3002:Trailer record error:300 +AAI_7114=5:4:ERROR:7114:500:3002:Input file error:300 +AAI_7115=5:4:ERROR:7115:500:3002:Unexpected error:900 +AAI_7116=5:4:ERROR:7116:500:3002:Request error:900 +AAI_7117=5:4:ERROR:7117:500:3002:Error in get http client object:500 +AAI_7118=5:4:ERROR:7118:500:3002:Script Error:900 +AAI_7119=5:4:ERROR:7119:500:3002:Unknown host:900 + +#--- DMaaP related errors +AAI_7304=4:5:ERROR:7304:500:3002:Error reaching DMaaP to send event:200 +AAI_7350=5:4:ERROR:7305:500:3002:Notification event creation failed:500 + +#--- aairestctlr: 7401-7499 +AAI_7401=5:4:ERROR:7401:500:3002:Error connecting to AAI REST API:200 +AAI_7402=5:4:ERROR:7402:500:3002:Unexpected error:900 +AAI_7403=5:4:WARN:7403:400:3001:Request error:900 +AAI_7404=5:4:INFO:7404:404:3001:Node not found:300 +AAI_7405=5:4:WARN:7405:200:0:UUID not formatted correctly, generating UUID:300 +AAI_7406=5:4:ERROR:7406:400:7406:Request Timed Out:200 + +#--- aaiauth: 9101-9199 +AAI_9101=5:0:WARN:9101:403:3300:User is not authorized to perform function:100 +AAI_9107=5:0:WARN:9107:403:3300:SSL is not provided in request, please contact admin:100 +AAI_9108=5:0:WARN:9107:403:3300:Basic auth credentials is not provided in the request:100 +AAI_9109=5:0:WARN:9109:403:3300:User is not allowed to perform implicit delete:500 diff --git a/aai-els-onap-logging/src/test/resources/logback.xml b/aai-els-onap-logging/src/test/resources/logback.xml new file mode 100644 index 00000000..7bf5d98f --- /dev/null +++ b/aai-els-onap-logging/src/test/resources/logback.xml @@ -0,0 +1,168 @@ +<!-- + ============LICENSE_START======================================================= + org.onap.aai + ================================================================================ + Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= +--> +<configuration scan="true" scanPeriod="60 seconds" debug="false"> + <statusListener class="ch.qos.logback.core.status.NopStatusListener" /> + + <property resource="application.properties" /> + + <property name="namespace" value="aai-resources"/> + + <property name="AJSC_HOME" value="${AJSC_HOME:-.}" /> + <jmxConfigurator /> + <property name="logDirectory" value="${AJSC_HOME}/logs" /> + + <property name="p_tim" value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}"/> + <property name="p_lvl" value="%level"/> + <property name="p_log" value="%logger"/> + <property name="p_mdc" value="%replace(%replace(%replace(%mdc){'\t','\\\\t'}){'\n', '\\\\n'}){'\\|', '!'}"/> + <property name="p_msg" value="%replace(%replace(%msg){'\t', '\\\\t'}){'\n','\\\\n'}"/> + <property name="p_exc" value="%replace(%replace(%rootException){'\t', '\\\\t'}){'\n','\\\\n'}"/> + <property name="p_mak" value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}"/> + <property name="p_thr" value="%thread"/> + <property name="pattern" value="%nopexception${p_tim}\t${p_thr}\t${p_lvl}\t${p_log}\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t%n"/> + <!-- Patterns from onap demo --> + <property name="errorPattern" value="%X{LogTimestamp}|%X{RequestID}|%thread|%replace(%X{ServiceName}){'\\|', '!'}|%X{PartnerName}|%X{TargetEntity}|%replace(%X{TargetServiceName}){'\\|', '!'}|%.-5level|%X{ErrorCode}|%X{ErrorDesc}|%msg%n" /> + <property name="debugPattern" value="%X{LogTimestamp}|%X{RequestID}|%msg\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t|^%n" /> + <property name="auditPattern" value="%X{EntryTimestamp}|%X{LogTimestamp}|%X{RequestID}|%X{ServiceInstanceID}|%thread||%replace(%X{ServiceName}){'\\|', '!'}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}||||${p_mak}|${p_mdc}|||%msg%n" /> + <property name="metricPattern" value="%X{InvokeTimestamp}|%X{LogTimestamp}|%X{RequestID}|%X{ServiceInstanceID}|%thread||%replace(%X{ServiceName}){'\\|', '!'}|%X{PartnerName}|%X{TargetEntity}|%replace(%X{TargetServiceName}){'\\|', '!'}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}||||%X{TargetVirtualEntity}|${p_mak}|${p_mdc}|||%msg%n" /> + <property name="transLogPattern" value="%X{LogTimestamp}|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{RequestID}|%X{ServiceInstanceID}|%-10t|%X{ServerFQDN}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%replace(%replace(%X{ResponseDesc}){'\\|', '!'}){'\r|\n', '^'}|%X{InstanceUUID}|%level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{clientIpAddress}||%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{PartnerName}:%m%n"/> + <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" /> + <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" /> + <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" /> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern> + %clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx} + </pattern> + </encoder> + </appender> + + + <appender name="asyncMETRIC" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="METRIC"/> + </appender> + + <appender name="DEBUG" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/debug.log</file> + <rollingPolicy + class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/debug.log.%d{yyyy-MM-dd}</fileNamePattern> + </rollingPolicy> + <encoder> + <pattern>${debugPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncDEBUG" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <appender-ref ref="DEBUG" /> + <includeCallerData>true</includeCallerData> + </appender> + <appender name="ERROR" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/error.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/error.log.%d{yyyy-MM-dd-HH-mm} + </fileNamePattern> + <maxHistory>1</maxHistory> + <cleanHistoryOnStart>true</cleanHistoryOnStart> + </rollingPolicy> + + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <encoder> + <pattern>${errorPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncERROR" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <appender-ref ref="ERROR"/> + </appender> + + <appender name="AUDIT" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/audit.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/audit.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder> + <pattern>${auditPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncAUDIT" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="AUDIT" /> + </appender> + + <appender name="auth" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>DEBUG</level> + </filter> + <file>${logDirectory}/auth/auth.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/auth/auth.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder> + <pattern>%d{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}[%thread] %-5level %logger{1024} - %msg%n</pattern> + </encoder> + </appender> + <appender name="asyncAUTH" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="auth" /> + </appender> + <!-- logback internals logging --> + + <logger name="ch.qos.logback.classic" level="WARN" /> + <logger name="ch.qos.logback.core" level="WARN" /> + + <logger name="com.jayway.jsonpath" level="WARN" /> + + <logger name="org.apache" level="OFF" /> + + <logger name="org.onap.aai" level="DEBUG" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + <logger name="org.onap.aai.aaf.auth" level="DEBUG" additivity="false"> + <appender-ref ref="asyncAUTH" /> + </logger> + <logger name="org.onap.aai.logging.ErrorLogHelper" level="WARN"> + <appender-ref ref="asyncERROR"/> + </logger> + + <root level="DEBUG"> + <appender-ref ref="STDOUT" /> + </root> +</configuration> |