Class stl_Logger

java.lang.Object
com.jackmeng.stl.stl_Logger
All Implemented Interfaces:
java.io.Serializable, java.lang.Runnable

public class stl_Logger
extends java.lang.Object
implements java.lang.Runnable, java.io.Serializable
Author:
Jack Meng
See Also:
Serialized Form
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static class  stl_Logger.Logger_DisableBehavior  
  • Field Summary

    Fields
    Modifier and Type Field Description
    private java.util.List<java.lang.Runnable> afterRoutine  
    private long COLLECTED  
    private java.util.concurrent.atomic.AtomicLong CYCLE  
    private boolean enabled  
    private java.io.File file  
    private int log_char_per_line  
    private java.util.Stack<java.lang.String> logs  
    private java.lang.String name  
    private boolean running  
    private java.lang.String saveLocation  
    private java.util.concurrent.atomic.AtomicBoolean saving  
    private long try_save_ms_periodic  
  • Constructor Summary

    Constructors
    Constructor Description
    stl_Logger​(java.lang.String loggerName, long save_time)  
    stl_Logger​(java.lang.String loggerName, java.lang.String saveLocation)  
    stl_Logger​(java.lang.String loggerName, java.lang.String saveLocationFolder, long save_time)  
  • Method Summary

    Modifier and Type Method Description
    int char_per_line()  
    void char_per_line​(int i)  
    void enable​(boolean e)  
    boolean enabled()  
    void kill()  
    void log​(java.lang.Object... contents)  
    java.lang.String name()  
    void push​(java.lang.Object contents)  
    void run()  
    java.lang.String saveLocation()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • try_save_ms_periodic

      private final long try_save_ms_periodic
    • saveLocation

      private final java.lang.String saveLocation
    • name

      private final java.lang.String name
    • file

      private final java.io.File file
    • logs

      private final java.util.Stack<java.lang.String> logs
    • running

      private boolean running
    • enabled

      private boolean enabled
    • saving

      private final java.util.concurrent.atomic.AtomicBoolean saving
    • afterRoutine

      private final transient java.util.List<java.lang.Runnable> afterRoutine
    • COLLECTED

      private transient long COLLECTED
    • CYCLE

      private final java.util.concurrent.atomic.AtomicLong CYCLE
    • log_char_per_line

      private int log_char_per_line
  • Constructor Details

    • stl_Logger

      public stl_Logger​(java.lang.String loggerName, java.lang.String saveLocationFolder, long save_time)
    • stl_Logger

      public stl_Logger​(java.lang.String loggerName, long save_time)
    • stl_Logger

      public stl_Logger​(java.lang.String loggerName, java.lang.String saveLocation)
  • Method Details

    • enable

      public void enable​(boolean e)
    • enabled

      public boolean enabled()
    • char_per_line

      public void char_per_line​(int i)
    • char_per_line

      public int char_per_line()
    • push

      public void push​(java.lang.Object contents)
    • log

      public void log​(java.lang.Object... contents)
    • kill

      public void kill()
    • name

      public java.lang.String name()
    • saveLocation

      public java.lang.String saveLocation()
    • run

      public void run()
      Specified by:
      run in interface java.lang.Runnable