Class EventMetaDataBuilder

java.lang.Object
com.github.eventmanager.internal.EventMetaDataBuilder

public class EventMetaDataBuilder extends Object
Utility class responsible for constructing event metadata.

Event metadata typically contains contextual information such as:

  • Timestamp indicating when the event occurred.
  • The log level associated with the event.
  • Class name where the log method was invoked.
  • Method name from which the event was logged.
  • The exact line number within the source file.

This metadata aids in debugging, troubleshooting, and providing detailed logging information.

  • Constructor Details

    • EventMetaDataBuilder

      public EventMetaDataBuilder()
  • Method Details

    • buildMetaData

      public static Map<String,String> buildMetaData(String level, LogHandler logHandler)
      Constructs a metadata map containing contextual information about a logged event.
      Parameters:
      level - the severity or informational level of the logged event (e.g., INFO, ERROR, DEBUG).
      logHandler - the LogHandler instance providing configuration, such as timestamp formatting details.
      Returns:
      a Map containing event metadata with keys: "time", "level", "className", "methodName", and "lineNumber".