Class SystemLogAppender


  • public class SystemLogAppender
    extends java.lang.Object
    This class extend the FileAppender class and defines API for writing logs to system files.
    • Constructor Summary

      Constructors 
      Constructor Description
      SystemLogAppender()
      Default constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void generateFileName()
      Creates a simple and absolute file name with the name of the component and current date in the root directory specified by the LogUtils class.
      java.lang.String getComponentName()
      Retrieves component name.
      java.lang.String getConfigId()
      Retrieves configuration ID.
      java.lang.String getFile()
      Returns absolute path for the log file.
      java.lang.String getFileName()
      Retrieves file name.
      int getMaxGenerations()  
      void setComponentName​(java.lang.String aComponentName)
      Sets the name of the component.
      void setConfigId​(java.lang.String aConfigId)
      Sets the configuration id.
      void setConfigInstance​(java.lang.Object configInstance)
      Sets the configuration id using a configInstance.
      void setMaxGenerations​(java.lang.String number)
      Sets max generations of log files
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SystemLogAppender

        public SystemLogAppender()
                          throws java.lang.Exception
        Default constructor
        Throws:
        java.lang.Exception
    • Method Detail

      • setComponentName

        public void setComponentName​(java.lang.String aComponentName)
                              throws java.lang.Exception
        Sets the name of the component.
        Parameters:
        aComponentName - String , AssemblyLine
        Throws:
        java.lang.Exception - : never.
      • getComponentName

        public java.lang.String getComponentName()
                                          throws java.lang.Exception
        Retrieves component name.
        Returns:
        String. The component name.
        Throws:
        java.lang.Exception - : never.
      • setConfigId

        public void setConfigId​(java.lang.String aConfigId)
                         throws java.lang.Exception
        Sets the configuration id.
        Parameters:
        aConfigId - String
        Throws:
        java.lang.Exception - : never.
      • setConfigInstance

        public void setConfigInstance​(java.lang.Object configInstance)
                               throws java.lang.Exception
        Sets the configuration id using a configInstance.
        Parameters:
        configInstance - object implementing RSInterface.
        Throws:
        java.lang.Exception - if configuration cannot be set.
      • getConfigId

        public java.lang.String getConfigId()
                                     throws java.lang.Exception
        Retrieves configuration ID.
        Returns:
        the configuration id.
        Throws:
        java.lang.Exception - : never
      • getFileName

        public java.lang.String getFileName()
        Retrieves file name.
        Returns:
        String, the file name.
      • setMaxGenerations

        public void setMaxGenerations​(java.lang.String number)
        Sets max generations of log files
        Parameters:
        number -
      • generateFileName

        public void generateFileName()
                              throws java.lang.Exception
        Creates a simple and absolute file name with the name of the component and current date in the root directory specified by the LogUtils class.
        Throws:
        java.lang.Exception - if the component type has not been assigned.
      • getFile

        public java.lang.String getFile()
        Returns absolute path for the log file.
        Returns:
      • getMaxGenerations

        public int getMaxGenerations()