Class TransformerDebugLog

  • All Implemented Interfaces:
    org.apache.commons.logging.Log

    @Deprecated
    public class TransformerDebugLog
    extends org.alfresco.util.LogAdapter
    Deprecated.
    The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
    Implementation of a Log that logs messages to a structure accessible via TransformerConfigMBean.getTransformationDebugLog(int).

    Author:
    Alan Davis
    • Field Summary

      • Fields inherited from class org.alfresco.util.LogAdapter

        log
    • Constructor Detail

      • TransformerDebugLog

        public TransformerDebugLog()
        Deprecated.
    • Method Detail

      • getUpperMaxEntries

        protected int getUpperMaxEntries()
        Deprecated.
        Overridden to specify the maximum value the maxEntries property may set. Generally quite a small number as values are stored in memory.

        Returns 20 as this is debug and we must currently walk the whole structure each time an new request id is added.

      • getPropertyName

        protected String getPropertyName()
        Deprecated.
        Overridden to specify the property name that specifies the maximum number of entries.
      • addOrModify

        protected void addOrModify​(Deque<org.alfresco.repo.content.transform.DebugEntry> entries,
                                   Object message)
        Deprecated.
        Overridden in sub classes to add a new entry or modify and existing one
      • setTransformerDebug

        public void setTransformerDebug​(TransformerDebug transformerDebug)
        Deprecated.
      • setTransformerConfig

        public void setTransformerConfig​(TransformerConfig transformerConfig)
        Deprecated.
        Parameters:
        transformerConfig - used to access the property.
      • isDebugEnabled

        public boolean isDebugEnabled()
        Deprecated.
        Enabled if number of transformer debug entries is greater than 0 AND there is not a test function generating output.
        Specified by:
        isDebugEnabled in interface org.apache.commons.logging.Log
        Overrides:
        isDebugEnabled in class org.alfresco.util.LogAdapter
      • debug

        public void debug​(Object message,
                          Throwable throwable)
        Deprecated.
        Specified by:
        debug in interface org.apache.commons.logging.Log
        Overrides:
        debug in class org.alfresco.util.LogAdapter
        Parameters:
        message - to be appended to the log
        throwable - ignored
      • remove

        protected void remove​(Deque<T> entries)
        Deprecated.
        Removes an entry. By default removes the first (oldest) entry by may be overridden.
      • getEntries

        public String[] getEntries​(int n)
        Deprecated.
        Returns the log entries.
        Parameters:
        n - the maximum number of entries to return. All if n is smaller or equal to zero.
      • getPropertyAndValue

        public String getPropertyAndValue​(Properties defaultProperties)
        Deprecated.
        The transformer property and value used to set this logger. This is commented out if the property has not been overridden (default is 0).
        Parameters:
        defaultProperties - the transformer.properties file values that may be overridden.
        Returns:
        the transformer property and value.