Class LogFile

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public abstract class LogFile
    extends java.lang.Object
    implements java.lang.AutoCloseable
    A simple interface for writing to a human readable log file.

    This API is designed to be compatible with J2CL. In the future it may be worth implementing this in terms of Flogger; however, at the time of writing, Flogger was not J2CL compatible.

    • Method Detail

      • createOrReopen

        @MustBeClosed
        public static LogFile createOrReopen​(java.nio.file.Path file)
      • createNoOp

        public static LogFile createNoOp()
      • log

        public abstract LogFile log​(java.lang.Object value)
      • log

        public abstract LogFile log​(java.lang.String value)
      • log

        public abstract LogFile log​(java.util.function.Supplier<java.lang.String> value)
      • log

        @FormatMethod
        public abstract LogFile log​(@FormatString
                                    java.lang.String template,
                                    java.lang.Object... values)
      • close

        public abstract void close()
        Specified by:
        close in interface java.lang.AutoCloseable