Package org.openrefine.util.logging
Class IndentingLayout
- java.lang.Object
-
- org.apache.logging.log4j.core.layout.AbstractLayout<String>
-
- org.apache.logging.log4j.core.layout.AbstractStringLayout
-
- org.openrefine.util.logging.IndentingLayout
-
- All Implemented Interfaces:
org.apache.logging.log4j.core.impl.LocationAware
,org.apache.logging.log4j.core.Layout<String>
,org.apache.logging.log4j.core.layout.Encoder<org.apache.logging.log4j.core.LogEvent>
,org.apache.logging.log4j.core.StringLayout
@Plugin(name="IndentingLayout", elementType="layout", category="Core", printObject=true) public class IndentingLayout extends org.apache.logging.log4j.core.layout.AbstractStringLayout
This is a special Log4j log formatter that is capable of reacting on special log messages and 'indent' the logs accordingly. This is very useful to visually inspect a debug log and see what calls what. An example of logs are> method()
and< method()
where > and < are used to indicate respectively "entering" and "exiting".
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayout
org.apache.logging.log4j.core.layout.AbstractStringLayout.Builder<B extends org.apache.logging.log4j.core.layout.AbstractStringLayout.Builder<B>>, org.apache.logging.log4j.core.layout.AbstractStringLayout.Serializer, org.apache.logging.log4j.core.layout.AbstractStringLayout.Serializer2
-
-
Field Summary
Fields Modifier and Type Field Description protected Calendar
calendar
protected static int
CONTEXT_SIZE
protected int
indentation
protected static long
MAX_DELTA
protected long
previousTime
-
Fields inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayout
DEFAULT_STRING_BUILDER_SIZE, MAX_STRING_BUILDER_SIZE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
IndentingLayout(Charset charset)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IndentingLayout
createLayout(Charset charset)
String
toSerializable(org.apache.logging.log4j.core.LogEvent event)
-
Methods inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayout
getBytes, getCharset, getContentType, getFooter, getFooterSerializer, getHeader, getHeaderSerializer, getStringBuilder, getStringBuilderEncoder, requiresLocation, serializeToBytes, serializeToString, toByteArray, trimToMaxSize
-
Methods inherited from class org.apache.logging.log4j.core.layout.AbstractLayout
encode, getConfiguration, getContentFormat, markEvent
-
-
-
-
Field Detail
-
CONTEXT_SIZE
protected static final int CONTEXT_SIZE
- See Also:
- Constant Field Values
-
MAX_DELTA
protected static final long MAX_DELTA
- See Also:
- Constant Field Values
-
calendar
protected Calendar calendar
-
previousTime
protected long previousTime
-
indentation
protected int indentation
-
-
Constructor Detail
-
IndentingLayout
protected IndentingLayout(Charset charset)
-
-
Method Detail
-
createLayout
@PluginFactory public static IndentingLayout createLayout(@PluginAttribute(value="charset",defaultString="UTF-8") Charset charset)
-
toSerializable
public String toSerializable(org.apache.logging.log4j.core.LogEvent event)
-
-