Class MakeLogEntry

  • All Implemented Interfaces:
    AdditionalInformationHandler, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, VariableChangeListener, Actor, ErrorHandler, InputConsumer, OutputProducer, Serializable, Comparable

    public class MakeLogEntry
    extends AbstractTransformer
    Creates a log entry from the incoming token. The incoming string gets added as the 'error' message in the log entry.

    Input/output:
    - accepts:
       java.lang.String
    - generates:
       adams.db.LogEntry


    Valid options are:

    -D <int> (property: debugLevel)
        The greater the number the more additional info the scheme may output to
        the console (0 = off).
        default: 0
        minimum: 0
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: MakeLogEntry
     
    -annotation <adams.core.base.BaseText> (property: annotations)
        The annotations to attach to this actor.
        default:
     
    -skip (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded
        as it is.
     
    -stop-flow-on-error (property: stopFlowOnError)
        If set to true, the flow gets stopped in case this actor encounters an error;
         useful for critical actors.
     
    -log-type <java.lang.String> (property: logType)
        The value to use as 'type' field in the log entries; 'Error' is used by
        default if left empty.
        default:
     
    -log-source <java.lang.String> (property: logSource)
        The value to use as 'source' field in the log entries; the actor's full
        name is used by default if left empty.
        default:
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_LogType

        protected String m_LogType
        the type of log entries to produce.
      • m_LogSource

        protected String m_LogSource
        the source to fill in the log entries.
    • Constructor Detail

      • MakeLogEntry

        public MakeLogEntry()
    • Method Detail

      • setLogType

        public void setLogType​(String value)
        Sets the type to use for the entries.
        Parameters:
        value - the type
      • getLogType

        public String getLogType()
        Returns the type to use for the entries.
        Returns:
        the type
      • logTypeTipText

        public String logTypeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setLogSource

        public void setLogSource​(String value)
        Sets the source to use in the log entries. Empty string uses the full name of the actor as default value.
        Parameters:
        value - the source
      • getLogSource

        public String getLogSource()
        Returns the source to use in the log entries. An empty string uses the full name of the actor as default value.
        Returns:
        the source
      • logSourceTipText

        public String logSourceTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • accepts

        public Class[] accepts()
        Returns the class that the consumer accepts.
        Returns:
        java.lang.String.class
      • doExecute

        protected String doExecute()
        Executes the flow item.
        Specified by:
        doExecute in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message
      • generates

        public Class[] generates()
        Returns the class of objects that it generates.
        Returns:
        adams.db.LogEntry.class