Class DebugLogBuffer

java.lang.Object
eu.svjatoslav.sixth.e3d.gui.DebugLogBuffer

public class DebugLogBuffer extends Object
Circular buffer for debug log messages.

Captures log messages to a fixed-size circular buffer for display in the DeveloperToolsPanel.

This allows capturing early initialization logs before the user opens the Developer Tools panel. When the panel is opened, the buffered history becomes immediately visible.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    DebugLogBuffer(int capacity)
    Creates a new DebugLogBuffer with the specified capacity.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears all buffered log entries.
    Returns all buffered log entries in chronological order.
    void
    log(String message)
    Logs a message with a timestamp prefix.
    int
    Returns the current number of log entries in the buffer.

    Methods inherited from class java.lang.Object

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

    • DebugLogBuffer

      public DebugLogBuffer(int capacity)
      Creates a new DebugLogBuffer with the specified capacity.
      Parameters:
      capacity - the maximum number of log entries to retain
  • Method Details

    • log

      public void log(String message)
      Logs a message with a timestamp prefix.
      Parameters:
      message - the message to log
    • getEntries

      public List<String> getEntries()
      Returns all buffered log entries in chronological order.
      Returns:
      a list of timestamped log entries
    • clear

      public void clear()
      Clears all buffered log entries.
    • size

      public int size()
      Returns the current number of log entries in the buffer.
      Returns:
      the number of entries