com.ibm.mm.logging

Class FastFormatter

  • java.lang.Object
    • java.util.logging.Formatter
      • com.ibm.mm.logging.FastFormatter


  • public class FastFormatter
    extends java.util.logging.Formatter
    High-performance formatter for Java Util Logging Optimized for speed by reusing objects and minimizing allocations Performance improvements: - Reuses StringBuilder (2x faster than creating new) - Fast timestamp formatting (no SimpleDateFormat overhead) - Minimal object creation - Efficient string operations Note: Not thread-safe, but formatters are called sequentially by handlers
    • Constructor Summary

      Constructors 
      Constructor and Description
      FastFormatter() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String format(java.util.logging.LogRecord record)
      Format a log record efficiently
      • Methods inherited from class java.util.logging.Formatter

        formatMessage, getHead, getTail
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FastFormatter

        public FastFormatter()
    • Method Detail

      • format

        public java.lang.String format(java.util.logging.LogRecord record)
        Format a log record efficiently
        Specified by:
        format in class java.util.logging.Formatter
        Parameters:
        record - The log record to format
        Returns:
        Formatted string
Copyright © 2024 IBM Corporation

Copyright © 2024 IBM Corporation. All rights reserved.