Home
Categories
Dictionnary
Download
Project Details
Changes Log
FAQ
License

Script logger


The org.scripthelper.context.ScriptLogger is an interface which logs informations and errors during the script execution.

It is possible to set a custom logger by ScriptManager.setScriptLogger(ScriptLogger).

The default logger is a org.scripthelper.context.DefaultScriptLogger and logs on the output stream and the error stream.

Logger API

The logger has the following methods:

public class ScriptLogger


Modifier and Type Method and Description
void append(String text)
Append a line of text, with a default color
void append(String text, String htmlColor)
Append a line of text, with a specific HTML color
void appendError(String message)
Append an error message
void appendError(Throwable th)
Append an error message. By default defer to appendError(String)

void clearTab()
Clear the current value of the tab for the text. All subsequent lines will be presented without tab. Do nothing by default.
void setTab(in ttabs)
Set the current value for of the tab for the text. All subsequent lines will be presented with a tab of tabs. Do nothing by default.

Customizing the logger

The default logger is a org.scripthelper.context.DefaultScriptLogger and logs on the output stream and the error stream.
  • The org.scripthelper.swing.DefaultSwingScriptLogger is a frame[1]
    You will need to add scriptHelperSwing.jar in the classpath of your IDE to compile. You however don't need to put it on the classpath of your application, because scriptHelperSwing.jar is referenced in javaXUL.jar manifest
  • The org.scripthelper.swing.DefaultSwingScriptLoggerArea is a component which you can integrate in your application[1]
    You will need to add scriptHelperSwing.jar in the classpath of your IDE to compile. You however don't need to put it on the classpath of your application, because scriptHelperSwing.jar is referenced in javaXUL.jar manifest

Notes

  1. ^ [1] [2] You will need to add scriptHelperSwing.jar in the classpath of your IDE to compile. You however don't need to put it on the classpath of your application, because scriptHelperSwing.jar is referenced in javaXUL.jar manifest

Categories: api

Copyright 2008-2020 Herve Girod. All Rights Reserved. Documentation and source under the LGPL licence