## org.autoplot.scriptconsole.LogConsole

GUI for graphically handling log records. This defines a Handler, and has methods for turning off console logging. (Another class should be used to log stderr and stdout messages.) Users can dump the records to a file for remote analysis.

## LogConsole( )

Creates new form LogConsole

## RECORD_SIZE_LIMIT

## PROP_SEARCHTEXT

## PROP_LOGSTATUS

status is the highest LOG Level seen in the past 300ms.

## PROP_SHOWONLYHIGHLITED

## PROP_SCRIPTCONTEXT

## addConsoleListener

addConsoleListener( java.awt.event.ActionListener listener ) → void

add method for listening to the console messages. Note this may change!

### Parameters

listener - an ActionListener

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc]

## getHandler

getHandler( ) → java.util.logging.Handler

create a handler that listens for log messages. This handler is added to the Loggers that should be displayed here. Also, the log levels of the Loggers should be set to ALL, since the filtering is done here. For example:

>         Handler h = lc.getHandler();
>         Logger.getLogger("autoplot").setLevel(Level.ALL);
>         Logger.getLogger("autoplot").addHandler(h);

### Returns:

handler for receiving messages.
[search for examples] [view on GitHub] [view on old javadoc]
getLogStatus( ) → java.util.logging.Level [view source]
getScriptContext( ) → java.util.Map [view source]
getSearchText( ) → String [view source]
isShowOnlyHighlited( ) → boolean [view source]

## logConsoleMessages

logConsoleMessages( ) → void

create loggers that log messages sent to System.err and System.out. This is used with turnOffConsoleHandlers. This checks to see if stderr and stdout are already logging, for example when a second application is launched in the same jvm.

### Returns:

void (returns nothing)

### See Also:

turnOffConsoleHandlers
[search for examples] [view on GitHub] [view on old javadoc]

## maybeRemovePrompts

maybeRemovePrompts( String s ) → String

remove prompts which are sometimes copied into mouse buffers. This detects "AP> ", ">>> ", and "... ".

### Parameters

s - the text entered.

### Returns:

the text without prefix.
[search for examples] [view on GitHub] [view on old javadoc]
setLevel( int level ) → void [view source]
setScriptContext( java.util.Map scriptContext ) → void [view source]
setSearchText( String searchText ) → void [view source]
setShowLevel( boolean selected ) → void [view source]
setShowLoggerId( boolean selected ) → void [view source]
setShowOnlyHighlited( boolean showOnlyHighlited ) → void [view source]
setShowThreads( boolean selected ) → void [view source]
setShowTimeStamps( boolean selected ) → void [view source]

## turnOffConsoleHandlers

turnOffConsoleHandlers( ) → void

iterate through the Handlers, looking for ConsoleHandlers, and turning them off.

### Returns:

void (returns nothing)

### See Also:

logConsoleMessages
[search for examples] [view on GitHub] [view on old javadoc]

## undoLogConsoleMessages

undoLogConsoleMessages( ) → void

remove this hook for listening to stdout and stderr messages.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc]

## update

update( ) → void

note this is generally called from a timer that coalesces events. But may be called explicitly in response to a user event as well. This should be called on the event thread!

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc]