com.ibm.commerce.ras

Class LogFile

  • java.lang.Object
    • com.ibm.commerce.ras.LogFile
  • All Implemented Interfaces:
    IOutputManager, java.lang.Cloneable


    public class LogFile
    extends java.lang.Object
    implements IOutputManager, java.lang.Cloneable
    LogFile is used to define the file output of the Logging service.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Constructor Summary

      Constructors 
      Constructor and Description
      LogFile()
      Constructor for LogFile.
      LogFile(java.lang.String fileName)
      Constructor for LogFile with specified file name.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void closeDevice()
      Closes the log file.
      java.lang.String getLogFileName()
      Returns the log file name;
      long getTriggerSize()
      Gets the trigger size of the file.
      static void main(java.lang.String[] args)
      A test example.
      void print(java.lang.String message)
      Writes to the log file.
      void setLogFileName(java.lang.String newLogFileName)
      Sets the log file name.
      void setTriggerSize(long newTriggerSize)
      Sets the maximum size of the file, in KB.
      void writeln(java.lang.String message)
      Writes the message to the log file.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • LogFile

        public LogFile()
        Constructor for LogFile.
      • LogFile

        public LogFile(java.lang.String fileName)
        Constructor for LogFile with specified file name.
        Parameters:
        fileName - file name to write logs to
    • Method Detail

      • closeDevice

        public void closeDevice()
        Closes the log file.
      • getTriggerSize

        public long getTriggerSize()
        Gets the trigger size of the file.
        Returns:
        the maximum file size
      • main

        public static void main(java.lang.String[] args)
        A test example.
      • print

        public void print(java.lang.String message)
        Writes to the log file.
        Specified by:
        print in interface IOutputManager
        Parameters:
        message - string
      • getLogFileName

        public java.lang.String getLogFileName()
        Returns the log file name;
        Returns:
        The log file name;
      • setLogFileName

        public void setLogFileName(java.lang.String newLogFileName)
        Sets the log file name.
        Parameters:
        newLogFileName - log file name
      • setTriggerSize

        public void setTriggerSize(long newTriggerSize)
        Sets the maximum size of the file, in KB. When this size is reached, another file is open.
        Parameters:
        newTriggerSize - long: the maximum file size in KBytes.
      • writeln

        public void writeln(java.lang.String message)
        Writes the message to the log file.
        Parameters:
        message - string