Record Class ElasticCommonSchemaService
java.lang.Object
java.lang.Record
org.springframework.boot.logging.structured.ElasticCommonSchemaService
- Record Components:
name
- the application nameversion
- the version of the applicationenvironment
- the name of the environment the application is running innodeName
- the name of the node the application is running on
public record ElasticCommonSchemaService(String name, String version, String environment, String nodeName)
extends Record
Service details for Elastic Common Schema structured logging.
- Since:
- 3.4.0
- Author:
- Moritz Halbritter, Phillip Webb
-
Constructor Summary
ConstructorsConstructorDescriptionElasticCommonSchemaService
(String name, String version, String environment, String nodeName) Creates an instance of aElasticCommonSchemaService
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theenvironment
record component.final boolean
Indicates whether some other object is "equal to" this one.static ElasticCommonSchemaService
get
(Environment environment) Return a newElasticCommonSchemaService
from bound from properties in the givenEnvironment
.final int
hashCode()
Returns a hash code value for this object.void
jsonMembers
(JsonWriter.Members<?> members) AddJsonWriter
members for the service.name()
Returns the value of thename
record component.nodeName()
Returns the value of thenodeName
record component.final String
toString()
Returns a string representation of this record class.version()
Returns the value of theversion
record component.
-
Constructor Details
-
ElasticCommonSchemaService
Creates an instance of aElasticCommonSchemaService
record class.- Parameters:
name
- the value for thename
record componentversion
- the value for theversion
record componentenvironment
- the value for theenvironment
record componentnodeName
- the value for thenodeName
record component
-
-
Method Details
-
jsonMembers
AddJsonWriter
members for the service.- Parameters:
members
- the members to add to
-
get
Return a newElasticCommonSchemaService
from bound from properties in the givenEnvironment
.- Parameters:
environment
- the source environment- Returns:
- a new
ElasticCommonSchemaService
instance
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
version
Returns the value of theversion
record component.- Returns:
- the value of the
version
record component
-
environment
Returns the value of theenvironment
record component.- Returns:
- the value of the
environment
record component
-
nodeName
Returns the value of thenodeName
record component.- Returns:
- the value of the
nodeName
record component
-