Class ConsoleJS

java.lang.Object
dev.latvian.mods.kubejs.script.ConsoleJS

public class ConsoleJS extends Object
  • Field Details

  • Constructor Details

    • ConsoleJS

      public ConsoleJS(ScriptType m, org.slf4j.Logger log)
  • Method Details

    • getCurrent

      public static ConsoleJS getCurrent(@Nullable @Nullable dev.latvian.mods.rhino.Context cx)
    • methodPattern

      public static Pattern methodPattern(Class<?> c, String method)
    • getLogger

      public org.slf4j.Logger getLogger()
    • shouldPrint

      protected boolean shouldPrint()
    • setMuted

      public void setMuted(boolean m)
    • getMuted

      public boolean getMuted()
    • setDebugEnabled

      public void setDebugEnabled(boolean m)
    • getDebugEnabled

      public boolean getDebugEnabled()
    • setWriteToFile

      public void setWriteToFile(boolean m)
    • getWriteToFile

      public boolean getWriteToFile()
    • startCapturingErrors

      public void startCapturingErrors()
    • stopCapturingErrors

      public void stopCapturingErrors()
    • resetFile

      public void resetFile()
    • writeToFile

      public void writeToFile(LogType type, String line)
    • writeToFile

      public void writeToFile(LogType type, long timestamp, String line)
    • flush

      public void flush(boolean sync)
    • log

      public void log(Object... message)
    • info

      public ConsoleLine info(Object message)
    • infof

      public ConsoleLine infof(String message, Object... args)
    • warn

      public ConsoleLine warn(Object message)
    • warn

      public ConsoleLine warn(String message, Throwable error, @Nullable @Nullable Pattern exitPattern)
    • warn

      public ConsoleLine warn(String message, SourceLine sourceLine, Throwable error, @Nullable @Nullable Pattern exitPattern)
    • warn

      public ConsoleLine warn(String message, Throwable error)
    • warnf

      public ConsoleLine warnf(String message, Object... args)
    • error

      public ConsoleLine error(Object message)
    • error

      public ConsoleLine error(String message, Throwable error, @Nullable @Nullable Pattern exitPattern)
    • error

      public ConsoleLine error(String message, SourceLine sourceLine, Throwable error, @Nullable @Nullable Pattern exitPattern)
    • error

      public ConsoleLine error(String message, Throwable throwable)
    • errorf

      public ConsoleLine errorf(String message, Object... args)
    • shouldPrintDebug

      public boolean shouldPrintDebug()
    • debug

      public ConsoleLine debug(Object message)
    • debugf

      public ConsoleLine debugf(String message, Object... args)
    • group

      public void group()
    • groupEnd

      public void groupEnd()
    • trace

      public void trace()
    • getScriptLine

      public int getScriptLine()
    • printClass

      public void printClass(String className, boolean tree)
    • printClass

      public void printClass(String className)
    • printObject

      public void printObject(@Nullable @Nullable Object o, boolean tree)
    • printObject

      public void printObject(@Nullable @Nullable Object o)
    • handleError

      public void handleError(ConsoleLine line, @Nullable @Nullable Throwable error, @Nullable @Nullable Pattern exitPattern, boolean print)
    • errorsComponent

      public net.minecraft.network.chat.Component errorsComponent(String command)
    • getErrorsResponse

      public dev.latvian.apps.tinyserver.http.response.HTTPResponse getErrorsResponse(KJSHTTPRequest ctx)
    • getWarningsResponse

      public dev.latvian.apps.tinyserver.http.response.HTTPResponse getWarningsResponse(KJSHTTPRequest ctx)