Class LogsFile

java.lang.Object
me.tayebyassine.homestead.logs.LogsFile

public final class LogsFile extends Object
Manages the plugin's persistent log file (logs.txt).

Each entry is prefixed with a timestamp in HH:mm:ss MM/dd/yyyy format. The file is cleared and re-initialized on every server start.

  • Constructor Details

    • LogsFile

      public LogsFile()
      Create or open the log file, clear its contents, and write the header banner.
  • Method Details

    • save

      public void save(String message)
      Append a timestamped message to the log file.
      Parameters:
      message - the message to write
    • clear

      public void clear()
      Clear all contents of the log file.