Package src

Class Logger

java.lang.Object
src.Logger
All Implemented Interfaces:
FileUsage

public class Logger extends Object implements FileUsage
The Files class provides methods to create a text file and write content to it.
  • Field Details

    • fileName

      public String fileName
      The name of the file (without extension).
  • Method Details

    • getInstance

      public static Logger getInstance()
      Allow other classes to access the static object
    • setUp

      public void setUp(String fileName)
      Creates a new text file with the specified name. If the file already exists, it notifies the user.
    • Use

      public void Use(String input)
      Writes the provided input to the file. Appends the text to the file if it already exists.
      Specified by:
      Use in interface FileUsage
      Parameters:
      input - The text to be written to the file.