Package dev.latvian.mods.kubejs.script
Class ConsoleJS
java.lang.Object
dev.latvian.mods.kubejs.script.ConsoleJS
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ConsoleJSWeakReference<dev.latvian.mods.rhino.ContextFactory> final Collection<ConsoleLine> final org.slf4j.Loggerfinal ScriptTypestatic ConsoleJSstatic ConsoleJSfinal Collection<ConsoleLine> dev.latvian.apps.tinyserver.ws.WSHandler<KJSHTTPRequest, KJSWSSession> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionerror(String message, SourceLine sourceLine, Throwable error, @Nullable Pattern exitPattern) net.minecraft.network.chat.ComponenterrorsComponent(String command) voidflush(boolean sync) static ConsoleJSgetCurrent(@Nullable dev.latvian.mods.rhino.Context cx) booleandev.latvian.apps.tinyserver.http.response.HTTPResponseorg.slf4j.LoggerbooleangetMuted()intdev.latvian.apps.tinyserver.http.response.HTTPResponsebooleanvoidgroup()voidgroupEnd()voidhandleError(ConsoleLine line, @Nullable Throwable error, @Nullable Pattern exitPattern, boolean print) voidstatic PatternmethodPattern(Class<?> c, String method) voidprintClass(String className) voidprintClass(String className, boolean tree) voidprintObject(@Nullable Object o) voidprintObject(@Nullable Object o, boolean tree) voidvoidsetDebugEnabled(boolean m) voidsetMuted(boolean m) voidsetWriteToFile(boolean m) protected booleanbooleanvoidvoidvoidtrace()warn(String message, SourceLine sourceLine, Throwable error, @Nullable Pattern exitPattern) voidwriteToFile(LogType type, long timestamp, String line) voidwriteToFile(LogType type, String line)
-
Field Details
-
STARTUP
-
SERVER
-
CLIENT
-
ERROR_REDUCE
-
scriptType
-
errors
-
warnings
-
logger
public final transient org.slf4j.Logger logger -
contextFactory
-
wsBroadcaster
-
-
Constructor Details
-
ConsoleJS
-
-
Method Details
-
getCurrent
-
methodPattern
-
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
-
writeToFile
-
flush
public void flush(boolean sync) -
log
-
info
-
infof
-
warn
-
warn
-
warn
public ConsoleLine warn(String message, SourceLine sourceLine, Throwable error, @Nullable @Nullable Pattern exitPattern) -
warn
-
warnf
-
error
-
error
-
error
public ConsoleLine error(String message, SourceLine sourceLine, Throwable error, @Nullable @Nullable Pattern exitPattern) -
error
-
errorf
-
shouldPrintDebug
public boolean shouldPrintDebug() -
debug
-
debugf
-
group
public void group() -
groupEnd
public void groupEnd() -
trace
public void trace() -
getScriptLine
public int getScriptLine() -
printClass
-
printClass
-
printObject
-
printObject
-
handleError
public void handleError(ConsoleLine line, @Nullable @Nullable Throwable error, @Nullable @Nullable Pattern exitPattern, boolean print) -
errorsComponent
-
getErrorsResponse
-
getWarningsResponse
public dev.latvian.apps.tinyserver.http.response.HTTPResponse getWarningsResponse(KJSHTTPRequest ctx)
-