Package com.guicedee.logger.model
Class LogProperty
- java.lang.Object
-
- com.guicedee.logger.model.LogProperty
-
public class LogProperty extends java.lang.ObjectA default log property- Since:
- Nov 22, 2016
- Author:
- GedMarc
-
-
Constructor Summary
Constructors Constructor Description LogProperty()Default constructor for a log propertyLogProperty(java.lang.String propertyName, java.lang.String propertyValue)A new log property
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetPropertyName()A specific property namejava.lang.StringgetPropertyValue()Gets the property valueinthashCode()static LogPropertynewProperty(LogProperties name, java.lang.String value)Creates a sortable list of properties that can be customized per handlerstatic LogPropertynewProperty(java.lang.String name, java.lang.String value)Returns a new log entry property and all registered global properties in the log factory@NotNull LogPropertysetPropertyName(java.lang.String propertyName)Sets the property name@NotNull LogPropertysetPropertyValue(java.lang.String propertyValue)Sets the property valuejava.lang.StringtoString()Returns a square bracket display of the properties
-
-
-
Method Detail
-
newProperty
public static LogProperty newProperty(LogProperties name, java.lang.String value)
Creates a sortable list of properties that can be customized per handler- Parameters:
name- the generalized property namevalue- the value- Returns:
- A Log Property
-
newProperty
public static LogProperty newProperty(java.lang.String name, java.lang.String value)
Returns a new log entry property and all registered global properties in the log factory- Parameters:
name- The name of the property (usually message)value- The value of the property- Returns:
- The new log property
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
Returns a square bracket display of the properties- Overrides:
toStringin classjava.lang.Object- Returns:
- The string
-
getPropertyName
public java.lang.String getPropertyName()
A specific property name- Returns:
- the property name or null
-
setPropertyName
@NotNull public @NotNull LogProperty setPropertyName(java.lang.String propertyName)
Sets the property name- Parameters:
propertyName- sets the property name- Returns:
- This object
-
getPropertyValue
public java.lang.String getPropertyValue()
Gets the property value- Returns:
- the property value
-
setPropertyValue
@NotNull public @NotNull LogProperty setPropertyValue(java.lang.String propertyValue)
Sets the property value- Parameters:
propertyValue- the property value- Returns:
- This
-
-