diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/NameAbbreviator.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/NameAbbreviator.java
index 1271ad5..6fa8ba5 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/NameAbbreviator.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/NameAbbreviator.java
@@ -44,7 +44,7 @@ public abstract class NameAbbreviator {
      */
     public static NameAbbreviator getAbbreviator(final String pattern) {
         if (pattern.length() > 0) {
-            //  if pattern is just spaces and numbers then
+            //  if pattern is just spaces and positive numbers then
             //     use MaxElementAbbreviator
             final String trimmed = pattern.trim();
 
@@ -66,6 +66,28 @@ public abstract class NameAbbreviator {
                 return new MaxElementAbbreviator(Integer.parseInt(trimmed));
             }
 
+            //  if pattern is just spaces and negative numbers then
+            //     use DropFirstElementsAbbreviator
+
+            if (trimmed.length() > 1 && trimmed.charAt(0) == '-') {
+
+                final String numbers = trimmed.substring(1);
+
+                int j = 0;
+
+                while (j < numbers.length() && numbers.charAt(j) >= '0'
+                        && numbers.charAt(j) <= '9') {
+                    j++;
+                }
+
+                //
+                //  if all blanks and digits
+                //
+                if (j == numbers.length()) {
+                    return new DropFirstElementsAbbreviator(Integer.parseInt(numbers));
+                }
+            }
+
             final ArrayList<PatternAbbreviatorFragment> fragments = new ArrayList<>(5);
             char ellipsis;
             int charCount;
@@ -197,6 +219,109 @@ public abstract class NameAbbreviator {
     }
 
     /**
+     * Abbreviator that drops first elements of the path elements.
+     *
+     * <p>This will be used in following pattern configurations.</p>
+     * <pre>
+     c{integer}
+     logger{integer}
+     C{integer}
+     class{integer}
+     * </pre>
+     *
+     * <p>Example results will be as follows.</p>
+     * <pre>
+     *     <b>Logger name:</b> org.apache.logging.log4j.core.pattern.LoggerName
+     *     <b>Caller's name:</b> org.apache.logging.log4j.core.pattern.CallerClass
+     *     <b>Log message:</b> This is a test message.
+     *
+     *     <table>
+     *          <thead>
+     *              <tr>
+     *              <th>Configuration</th>
+     *              <th>Output</th>
+     *              </tr>
+     *          </thead>
+     *          <tbody>
+     *          <tr>
+     *              <td>%c{-1} %m</td>
+     *              <td>apache.logging.log4j.core.pattern.LoggerName This is a test message.</td>
+     *          </tr>
+     *          <tr>
+     *              <td>%c{-3} %m</td>
+     *              <td>log4j.core.pattern.LoggerName This is a test message.</td>
+     *          </tr>
+     *          <tr>
+     *              <td>%c{-20} %m</td>
+     *              <td>org.apache.logging.log4j.core.pattern.LoggerName This is a test message.</td>
+     *          </tr>
+     *          <tr>
+     *              <td>%logger{-1} %m</td>
+     *              <td>apache.logging.log4j.core.pattern.LoggerName This is a test message.</td>
+     *          </tr>
+     *          <tr>
+     *              <td>%C{-1} %m</td>
+     *              <td>apache.logging.log4j.core.pattern.CallerClass This is a test message.</td>
+     *          </tr>
+     *          <tr>
+     *              <td>%C{-3} %m</td>
+     *              <td>log4j.core.pattern.CallerClass This is a test message.</td>
+     *          </tr>
+     *          <tr>
+     *              <td>%C{-20} %m</td>
+     *              <td>org.apache.logging.log4j.core.pattern.CallerClass This is a test message.</td>
+     *          </tr>
+     *          <tr>
+     *              <td>%class{-1} %m</td>
+     *              <td>apache.logging.log4j.core.pattern.CallerClass This is a test message.</td>
+     *          </tr>
+     *          </tbody>
+     *     </table>
+     * </pre>
+     * <p></p>
+     * <b>Note:</b> If a path does not contain enough path elements to drop, none will be dropped.
+     */
+    private static class DropFirstElementsAbbreviator extends NameAbbreviator {
+        /**
+         * Maximum number of path elements to drop.
+         */
+        private final int count;
+
+        /**
+         * Create new instance.
+         *
+         * @param count maximum number of path elements to drop.
+         */
+        public DropFirstElementsAbbreviator(final int count) {
+            this.count = count < 0 ? 0 : count;
+        }
+
+        /**
+         * Abbreviate name.
+         *
+         * @param original The String to abbreviate.
+         * @param destination
+         * @return the abbreviated String.
+         */
+        @Override
+        public void abbreviate(final String original, final StringBuilder destination) {
+
+            int start = 0;
+            int nextStart = 0;
+            for (int i = 0; i < count; i++) {
+                nextStart = original.indexOf('.', start);
+                if (nextStart == -1) {
+                    destination.append(original);
+                    return;
+                } else {
+                    start = nextStart + 1;
+                }
+            }
+            destination.append(original, start, original.length());
+        }
+    }
+
+    /**
      * Fragment of an pattern abbreviator.
      */
     private static class PatternAbbreviatorFragment {
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/PatternLayoutTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/PatternLayoutTest.java
index 988b42b..e92265a 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/PatternLayoutTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/PatternLayoutTest.java
@@ -398,4 +398,207 @@ public class PatternLayoutTest {
                 .withConfiguration(ctx.getConfiguration()).withCharset(StandardCharsets.UTF_8).build();
         assertEquals(StandardCharsets.UTF_8, layout.getCharset());
     }
+
+    @Test
+    public void testLoggerNameTruncationByRetainingPartsFromEnd() throws Exception {
+        {
+            final PatternLayout layout = PatternLayout.newBuilder().withPattern("%c{1} %m")
+                    .withConfiguration(ctx.getConfiguration()).build();
+            final LogEvent event1 = Log4jLogEvent.newBuilder()
+                    .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger")
+                    .setLevel(Level.INFO)
+                    .setMessage(new SimpleMessage("Hello, world 1!")).build();
+            final String result1 = layout.toSerializable(event1);
+            assertEquals(this.getClass().getName().substring(this.getClass().getName().lastIndexOf(".") + 1) + " Hello, world 1!", new String(result1));
+        }
+        {
+            final PatternLayout layout = PatternLayout.newBuilder().withPattern("%c{2} %m")
+                    .withConfiguration(ctx.getConfiguration()).build();
+            final LogEvent event1 = Log4jLogEvent.newBuilder()
+                    .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger")
+                    .setLevel(Level.INFO)
+                    .setMessage(new SimpleMessage("Hello, world 1!")).build();
+            final String result1 = layout.toSerializable(event1);
+            String name = this.getClass().getName().substring(0, this.getClass().getName().lastIndexOf("."));
+            name = name.substring(0, name.lastIndexOf("."));
+            assertEquals(this.getClass().getName().substring(name.length() + 1) + " Hello, world 1!", new String(result1));
+        }
+        {
+            final PatternLayout layout = PatternLayout.newBuilder().withPattern("%c{20} %m")
+                    .withConfiguration(ctx.getConfiguration()).build();
+            final LogEvent event1 = Log4jLogEvent.newBuilder()
+                    .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger")
+                    .setLevel(Level.INFO)
+                    .setMessage(new SimpleMessage("Hello, world 1!")).build();
+            final String result1 = layout.toSerializable(event1);
+            assertEquals(this.getClass().getName() + " Hello, world 1!", new String(result1));
+        }
+    }
+
+
+    @Test
+    public void testCallersFqcnTruncationByRetainingPartsFromEnd() throws Exception {
+        {
+            final PatternLayout layout = PatternLayout.newBuilder().withPattern("%C{1} %m")
+                    .withConfiguration(ctx.getConfiguration()).build();
+            final LogEvent event1 = Log4jLogEvent.newBuilder()
+                    .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger")
+                    .setLevel(Level.INFO)
+                    .setMessage(new SimpleMessage("Hello, world 1!"))
+                    .setSource(new StackTraceElement(this.getClass().getName(), "testCallersFqcnTruncationByRetainingPartsFromEnd", this.getClass().getCanonicalName() + ".java", 440))
+                    .build();
+            final String result1 = layout.toSerializable(event1);
+            assertEquals(this.getClass().getName().substring(this.getClass().getName().lastIndexOf(".") + 1) + " Hello, world 1!", new String(result1));
+        }
+        {
+            final PatternLayout layout = PatternLayout.newBuilder().withPattern("%C{2} %m")
+                    .withConfiguration(ctx.getConfiguration()).build();
+            final LogEvent event1 = Log4jLogEvent.newBuilder()
+                    .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger")
+                    .setLevel(Level.INFO)
+                    .setMessage(new SimpleMessage("Hello, world 1!"))
+                    .setSource(new StackTraceElement(this.getClass().getName(), "testCallersFqcnTruncationByRetainingPartsFromEnd", this.getClass().getCanonicalName() + ".java", 440))
+                    .build();
+            final String result1 = layout.toSerializable(event1);
+            String name = this.getClass().getName().substring(0, this.getClass().getName().lastIndexOf("."));
+            name = name.substring(0, name.lastIndexOf("."));
+            assertEquals(this.getClass().getName().substring(name.length() + 1) + " Hello, world 1!", new String(result1));
+        }
+        {
+            final PatternLayout layout = PatternLayout.newBuilder().withPattern("%C{20} %m")
+                    .withConfiguration(ctx.getConfiguration()).build();
+            final LogEvent event1 = Log4jLogEvent.newBuilder()
+                    .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger")
+                    .setLevel(Level.INFO)
+                    .setMessage(new SimpleMessage("Hello, world 1!"))
+                    .setSource(new StackTraceElement(this.getClass().getName(), "testCallersFqcnTruncationByRetainingPartsFromEnd", this.getClass().getCanonicalName() + ".java", 440))
+                    .build();
+            final String result1 = layout.toSerializable(event1);
+            assertEquals(this.getClass().getName() + " Hello, world 1!", new String(result1));
+        }
+        {
+            final PatternLayout layout = PatternLayout.newBuilder().withPattern("%class{1} %m")
+                    .withConfiguration(ctx.getConfiguration()).build();
+            final LogEvent event1 = Log4jLogEvent.newBuilder()
+                    .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger")
+                    .setLevel(Level.INFO)
+                    .setMessage(new SimpleMessage("Hello, world 1!"))
+                    .setSource(new StackTraceElement(this.getClass().getName(), "testCallersFqcnTruncationByRetainingPartsFromEnd", this.getClass().getCanonicalName() + ".java", 440))
+                    .build();
+            final String result1 = layout.toSerializable(event1);
+            assertEquals(this.getClass().getName().substring(this.getClass().getName().lastIndexOf(".") + 1) + " Hello, world 1!", new String(result1));
+        }
+    }
+
+    @Test
+    public void testLoggerNameTruncationByDroppingPartsFromFront() throws Exception {
+        {
+            final PatternLayout layout = PatternLayout.newBuilder().withPattern("%c{-1} %m")
+                    .withConfiguration(ctx.getConfiguration()).build();
+            final LogEvent event1 = Log4jLogEvent.newBuilder()
+                    .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger")
+                    .setLevel(Level.INFO)
+                    .setMessage(new SimpleMessage("Hello, world 1!")).build();
+            final String result1 = layout.toSerializable(event1);
+            String name = this.getClass().getName().substring(this.getClass().getName().indexOf(".") + 1);
+            assertEquals(name + " Hello, world 1!", new String(result1));
+        }
+        {
+            final PatternLayout layout = PatternLayout.newBuilder().withPattern("%c{-3} %m")
+                    .withConfiguration(ctx.getConfiguration()).build();
+            final LogEvent event1 = Log4jLogEvent.newBuilder()
+                    .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger")
+                    .setLevel(Level.INFO)
+                    .setMessage(new SimpleMessage("Hello, world 1!")).build();
+            final String result1 = layout.toSerializable(event1);
+            String name = this.getClass().getName().substring(this.getClass().getName().indexOf(".") + 1);
+            name = name.substring(name.indexOf(".") + 1);
+            name = name.substring(name.indexOf(".") + 1);
+            assertEquals(name + " Hello, world 1!", new String(result1));
+        }
+        {
+            final PatternLayout layout = PatternLayout.newBuilder().withPattern("%logger{-3} %m")
+                    .withConfiguration(ctx.getConfiguration()).build();
+            final LogEvent event1 = Log4jLogEvent.newBuilder()
+                    .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger")
+                    .setLevel(Level.INFO)
+                    .setMessage(new SimpleMessage("Hello, world 1!")).build();
+            final String result1 = layout.toSerializable(event1);
+            String name = this.getClass().getName().substring(this.getClass().getName().indexOf(".") + 1);
+            name = name.substring(name.indexOf(".") + 1);
+            name = name.substring(name.indexOf(".") + 1);
+            assertEquals(name + " Hello, world 1!", new String(result1));
+        }
+        {
+            final PatternLayout layout = PatternLayout.newBuilder().withPattern("%c{-20} %m")
+                    .withConfiguration(ctx.getConfiguration()).build();
+            final LogEvent event1 = Log4jLogEvent.newBuilder()
+                    .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger")
+                    .setLevel(Level.INFO)
+                    .setMessage(new SimpleMessage("Hello, world 1!")).build();
+            final String result1 = layout.toSerializable(event1);
+            assertEquals(this.getClass().getName() + " Hello, world 1!", new String(result1));
+        }
+
+    }
+
+    @Test
+    public void testCallersFqcnTruncationByDroppingPartsFromFront() throws Exception {
+        {
+            final PatternLayout layout = PatternLayout.newBuilder().withPattern("%C{-1} %m")
+                    .withConfiguration(ctx.getConfiguration()).build();
+            final LogEvent event1 = Log4jLogEvent.newBuilder()
+                    .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger")
+                    .setLevel(Level.INFO)
+                    .setMessage(new SimpleMessage("Hello, world 1!"))
+                    .setSource(new StackTraceElement(this.getClass().getName(), "testCallersFqcnTruncationByDroppingPartsFromFront", this.getClass().getCanonicalName() + ".java", 546))
+                    .build();
+            final String result1 = layout.toSerializable(event1);
+            String name = this.getClass().getName().substring(this.getClass().getName().indexOf(".") + 1);
+            assertEquals(name + " Hello, world 1!", new String(result1));
+        }
+        {
+            final PatternLayout layout = PatternLayout.newBuilder().withPattern("%C{-3} %m")
+                    .withConfiguration(ctx.getConfiguration()).build();
+            final LogEvent event1 = Log4jLogEvent.newBuilder()
+                    .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger")
+                    .setLevel(Level.INFO)
+                    .setMessage(new SimpleMessage("Hello, world 1!"))
+                    .setSource(new StackTraceElement(this.getClass().getName(), "testCallersFqcnTruncationByDroppingPartsFromFront", this.getClass().getCanonicalName() + ".java", 546))
+                    .build();
+            final String result1 = layout.toSerializable(event1);
+            String name = this.getClass().getName().substring(this.getClass().getName().indexOf(".") + 1);
+            name = name.substring(name.indexOf(".") + 1);
+            name = name.substring(name.indexOf(".") + 1);
+            assertEquals(name + " Hello, world 1!", new String(result1));
+        }
+        {
+            final PatternLayout layout = PatternLayout.newBuilder().withPattern("%class{-3} %m")
+                    .withConfiguration(ctx.getConfiguration()).build();
+            final LogEvent event1 = Log4jLogEvent.newBuilder()
+                    .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger")
+                    .setLevel(Level.INFO)
+                    .setMessage(new SimpleMessage("Hello, world 1!"))
+                    .setSource(new StackTraceElement(this.getClass().getName(), "testCallersFqcnTruncationByDroppingPartsFromFront", this.getClass().getCanonicalName() + ".java", 546))
+                    .build();
+            final String result1 = layout.toSerializable(event1);
+            String name = this.getClass().getName().substring(this.getClass().getName().indexOf(".") + 1);
+            name = name.substring(name.indexOf(".") + 1);
+            name = name.substring(name.indexOf(".") + 1);
+            assertEquals(name + " Hello, world 1!", new String(result1));
+        }
+        {
+            final PatternLayout layout = PatternLayout.newBuilder().withPattern("%C{-20} %m")
+                    .withConfiguration(ctx.getConfiguration()).build();
+            final LogEvent event1 = Log4jLogEvent.newBuilder()
+                    .setLoggerName(this.getClass().getName()).setLoggerFqcn("org.apache.logging.log4j.core.Logger")
+                    .setLevel(Level.INFO)
+                    .setMessage(new SimpleMessage("Hello, world 1!"))
+                    .setSource(new StackTraceElement(this.getClass().getName(), "testCallersFqcnTruncationByDroppingPartsFromFront", this.getClass().getCanonicalName() + ".java", 546))
+                    .build();
+            final String result1 = layout.toSerializable(event1);
+            assertEquals(this.getClass().getName() + " Hello, world 1!", new String(result1));
+        }
+
+    }
 }
