public abstract class GenericBuilder extends Object
Constructor and Description |
---|
GenericBuilder(BaseCategory category) |
Modifier and Type | Method and Description |
---|---|
protected void |
log(org.apache.logging.log4j.Logger logger,
boolean ignoreContext)
Logs the built error.
|
protected void |
putArg(String placeholder,
Object value)
Stores the placeholder value in a HashMap.
|
protected void |
setData(String errorName,
String userMessage,
String technicalMessage,
String solution,
Impact impact,
Severity severity)
Sets the basic error data by creating a holder for it.
|
protected void |
setThrowable(Throwable throwable)
Sets throwable, if there is one, that should be logged.
|
String |
toString()
Convert built log error to String, as it would be loggeed to a file.
|
public GenericBuilder(BaseCategory category)
category
- Category of the error that should be logged.protected void log(org.apache.logging.log4j.Logger logger, boolean ignoreContext)
logger
- log4j logger that executes the logging.ignoreContext
- flag whether context node should be ignored.protected void setData(String errorName, String userMessage, String technicalMessage, String solution, Impact impact, Severity severity)
errorName
- name of the error.userMessage
- user message of the error.technicalMessage
- technical message of the error.solution
- solution of the error.impact
- impact of the error.severity
- severity of the error.protected void setThrowable(Throwable throwable)
throwable
- Exception that should be logged.protected void putArg(String placeholder, Object value)
placeholder
- Name of the placeholder in a message. Set up in a message in a format %{placeholderName}value
- Value that should later replace the placeholder.Copyright © 2020. All rights reserved.