@AlfrescoPublicApi
public class TransformerLog
extends org.alfresco.util.LogAdapter
Log
that logs messages to a structure accessible via
TransformerConfigMBean.getTransformationLog(int)
.Constructor and Description |
---|
TransformerLog() |
Modifier and Type | Method and Description |
---|---|
protected void |
addOrModify(Deque<String> entries,
Object message)
Overridden in sub classes to add a new entry or modify and existing one
|
void |
debug(Object message,
Throwable throwable) |
String[] |
getEntries(int n)
Returns the log entries.
|
String |
getPropertyAndValue(Properties defaultProperties)
The transformer property and value used to set this logger.
|
protected String |
getPropertyName()
Overridden to specify the property name that specifies the maximum number of entries.
|
protected int |
getUpperMaxEntries()
Overridden to specify the maximum value the maxEntries property may set.
|
boolean |
isDebugEnabled()
Enabled if number of transformer debug entries is greater than 0
AND there is not a test function generating output.
|
protected void |
remove(Deque<T> entries)
Removes an entry.
|
void |
setTransformerConfig(TransformerConfig transformerConfig) |
void |
setTransformerDebug(TransformerDebug transformerDebug) |
debug, error, error, fatal, fatal, info, info, isErrorEnabled, isFatalEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, trace, trace, warn, warn
protected int getUpperMaxEntries()
Returns 100 as this is currently held in memory.
protected String getPropertyName()
protected void addOrModify(Deque<String> entries, Object message)
public void setTransformerDebug(TransformerDebug transformerDebug)
public void setTransformerConfig(TransformerConfig transformerConfig)
transformerConfig
- used to access the property.public boolean isDebugEnabled()
isDebugEnabled
in interface org.apache.commons.logging.Log
isDebugEnabled
in class org.alfresco.util.LogAdapter
public void debug(Object message, Throwable throwable)
debug
in interface org.apache.commons.logging.Log
debug
in class org.alfresco.util.LogAdapter
message
- to be appended to the logthrowable
- ignoredprotected void remove(Deque<T> entries)
public String[] getEntries(int n)
n
- the maximum number of entries to return. All if n is smaller or equal to zero.public String getPropertyAndValue(Properties defaultProperties)
defaultProperties
- the transformer.properties file values that may be overridden.Copyright © 2005–2017 Alfresco Software. All rights reserved.