Update the license for 2017-2018 license
[aai/aai-common.git] / aai-core / src / main / java / org / onap / aai / logging / CNName.java
index 7adbe87..1a60af1 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * org.onap.aai
  * ================================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * 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.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  */
 package org.onap.aai.logging;
 
 import ch.qos.logback.access.pattern.AccessConverter;
 import ch.qos.logback.access.spi.IAccessEvent;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
 
 import javax.security.auth.x500.X500Principal;
 import javax.servlet.http.HttpServletRequest;
@@ -31,6 +31,7 @@ import java.security.cert.X509Certificate;
 import static java.util.Base64.getDecoder;
 
 public class CNName extends AccessConverter {
+       private static final EELFLogger LOGGER = EELFManager.getInstance().getLogger(CNName.class);
 
        /**
         * Converts access events to String response codes
@@ -83,7 +84,8 @@ public class CNName extends AccessConverter {
                                        authUser = subjectDN.toString();
                                        return authUser;
                                }
-                       } catch(Exception ex){
+                       } catch(Exception e){
+                LOGGER.error(e.getMessage(),e);
                                return "-";
                        }
                } else {