/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements. See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You 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.
 */
package org.apache.logging.log4j.core.pattern;

import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.config.plugins.Plugin;


/**
 * Returns the event's NDC in a StringBuilder.
 */
@Plugin(name = "NdcPatternConverter", category = PatternConverter.CATEGORY)
@ConverterKeys({ "x", "NDC" })
public final class NdcPatternConverter extends LogEventPatternConverter {
  /**
   *   Singleton.
   */
  private static final NdcPatternConverter INSTANCE =
    new NdcPatternConverter();

  /**
   * Private constructor.
   */
  private NdcPatternConverter() {
    super("NDC", "ndc");
  }

  /**
   * Obtains an instance of NdcPatternConverter.
   * @param options options, may be null.
   * @return instance of NdcPatternConverter.
   */
  public static NdcPatternConverter newInstance(final String[] options) {
    return INSTANCE;
  }

  /**
   * {@inheritDoc}
   */
  @Override
public void format(final LogEvent event, final StringBuilder toAppendTo) {
    toAppendTo.append(event.getContextStack());
  }
}

@@ -1098,17 +1098,16 @@
 erKeys(%7B
- 
 %22x%22, %22ND
@@ -1108,17 +1108,16 @@
 %22, %22NDC%22
- 
 %7D)%0Apubli
@@ -1185,16 +1185,18 @@
 erter %7B%0A
+  
   /**%0A  
@@ -1196,19 +1196,19 @@
  /**%0A   
-*
   
+*
  Singlet
@@ -1210,27 +1210,31 @@
 ngleton.%0A   
+  
 */%0A
+  
   private st
@@ -1279,16 +1279,20 @@
 E =%0A    
+    
 new NdcP
@@ -1311,16 +1311,18 @@
 ter();%0A%0A
+  
   /**%0A  
@@ -1322,16 +1322,18 @@
  /**%0A   
+  
 * Privat
@@ -1350,19 +1350,23 @@
 tor.%0A   
+  
 */%0A
+  
   privat
@@ -1395,16 +1395,20 @@
 ) %7B%0A    
+    
 super(%22N
@@ -1420,27 +1420,33 @@
 %22ndc%22);%0A
+  
   %7D%0A%0A  
+  
 /**%0A
+  
    * Obt
@@ -1482,24 +1482,33 @@
 nConverter.%0A
+     *%0A  
    * @param 
@@ -1540,16 +1540,18 @@
 ull.%0A   
+  
 * @retur
@@ -1588,21 +1588,25 @@
 ter.%0A   
+  
 */%0A  
+  
 public s
@@ -1665,24 +1665,28 @@
  options) %7B%0A
+    
     return I
@@ -1700,42 +1700,15 @@
 ;%0A  
-%7D%0A%0A  /**%0A   * %7B@inheritDoc%7D%0A 
+  %7D%0A%0A
   
-*/%0A
   @O
@@ -1715,16 +1715,20 @@
 verride%0A
+    
 public v
@@ -1790,24 +1790,28 @@
 AppendTo) %7B%0A
+    
     toAppend
@@ -1846,14 +1846,16 @@
 ack());%0A
+  
   %7D%0A%7D%0A

Format nit.