Package com.ppm.logging
Class LogKeyValueBuilder
- java.lang.Object
-
- com.ppm.logging.LogKeyValueBuilder
-
- All Implemented Interfaces:
AsLevel,LogKey,RecursiveLogKey
public final class LogKeyValueBuilder extends Object implements LogKey, RecursiveLogKey
LogKeyValue Builder- Author:
- Pedro T. Oliveira
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AsLevelasDebug()Log information as DebugAsLevelasError()Log information as ErrorAsLevelasInfo()Log information as InfoAsLevelasWarn()Log information as WarnLogKeychangeKey(String key)Construct a Key with '=' if not present.protected static LogKeyValueBuildercreate(org.apache.logging.log4j.Logger logger, String key)Create a LogKeyValueBuilderStringgetKey()LogKeykey(String key)Add a key to logRecursiveLogKeyvalue(Object msg)Attach a value to this correspondent key.
-
-
-
Method Detail
-
create
protected static LogKeyValueBuilder create(org.apache.logging.log4j.Logger logger, String key)
Create a LogKeyValueBuilder- Parameters:
logger- internal Loggerkey- Key- Returns:
- a LogKeyValueBuilder
-
value
public RecursiveLogKey value(Object msg)
Description copied from interface:LogKeyAttach a value to this correspondent key.
-
getKey
public String getKey()
- Returns:
- the key
-
key
public LogKey key(String key)
Description copied from interface:RecursiveLogKeyAdd a key to log- Specified by:
keyin interfaceRecursiveLogKey- Parameters:
key- key value. Can be formated with "=" or without it.- Returns:
- SplunkLogKey
-
changeKey
public LogKey changeKey(String key)
Construct a Key with '=' if not present.- Parameters:
key- a String- Returns:
- a LogKey
-
asError
public AsLevel asError()
Description copied from interface:AsLevelLog information as Error
-
-