Package com.guicedee.logger.model
Class LogProperty
java.lang.Object
com.guicedee.logger.model.LogProperty
public class LogProperty
extends java.lang.Object
A 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
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 propertiesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
LogProperty
public LogProperty()Default constructor for a log property -
LogProperty
public LogProperty(java.lang.String propertyName, java.lang.String propertyValue)A new log property- Parameters:
propertyName- a specific propertypropertyValue- the property value
-
-
Method Details
-
newProperty
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
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
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
Sets the property value- Parameters:
propertyValue- the property value- Returns:
- This
-