org.apache.logging.log4j.layout.template.json.util

Class InstantFormatter

  • java.lang.Object
    • org.apache.logging.log4j.layout.template.json.util.InstantFormatter
    • Method Detail

      • isInstantMatching

        public boolean isInstantMatching(Instant instant1,
                                         Instant instant2)
        Checks if the given Instants are equal from the point of view of the employed formatter.

        This method should be preferred over Instant#equals(Object). For instance, FixedDateFormat and FastDateFormat discard nanoseconds, hence, from their point of view, two different Instants are equal if they match up to millisecond precision.

      • getInternalImplementationClass

        public Class<?> getInternalImplementationClass()

Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.