Record Class GraylogExtendedLogFormatProperties

java.lang.Object
java.lang.Record
org.springframework.boot.logging.structured.GraylogExtendedLogFormatProperties
Record Components:
host - the application name
service - the version of the application

public record GraylogExtendedLogFormatProperties(String host, GraylogExtendedLogFormatProperties.Service service) extends Record
Service details for Graylog Extended Log Format structured logging.
Since:
3.4.0
Author:
Samuel Lissner, Phillip Webb
  • Constructor Details

    • GraylogExtendedLogFormatProperties

      public GraylogExtendedLogFormatProperties(String host, GraylogExtendedLogFormatProperties.Service service)
      Creates an instance of a GraylogExtendedLogFormatProperties record class.
      Parameters:
      host - the value for the host record component
      service - the value for the service record component
  • Method Details

    • jsonMembers

      public void jsonMembers(JsonWriter.Members<?> members)
      Add JsonWriter members for the service.
      Parameters:
      members - the members to add to
    • get

      public static GraylogExtendedLogFormatProperties get(Environment environment)
      Return a new GraylogExtendedLogFormatProperties from bound from properties in the given Environment.
      Parameters:
      environment - the source environment
      Returns:
      a new GraylogExtendedLogFormatProperties instance
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • host

      public String host()
      Returns the value of the host record component.
      Returns:
      the value of the host record component
    • service

      Returns the value of the service record component.
      Returns:
      the value of the service record component