## 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

getLogStatus( ) → java.util.logging.Level

### Returns:

java.util.logging.Level
[search for examples] [view on GitHub] [view on old javadoc]

## getScriptContext

getScriptContext( ) → java.util.Map

### Returns:

java.util.Map
[search for examples] [view on GitHub] [view on old javadoc]

## getSearchText

getSearchText( ) → String

### Returns:

java.lang.String
[search for examples] [view on GitHub] [view on old javadoc]

## isShowOnlyHighlited

isShowOnlyHighlited( ) → boolean

### Returns:

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

## 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

setLevel( int level ) → void

### Parameters

level - an int

### Returns:

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

## setScriptContext

setScriptContext( java.util.Map scriptContext ) → void

### Parameters

scriptContext - a java.util.Map

### Returns:

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

## setSearchText

setSearchText( String searchText ) → void

### Parameters

searchText - a String

### Returns:

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

## setShowLevel

setShowLevel( boolean selected ) → void

### Parameters

selected - a boolean

### Returns:

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

## setShowLoggerId

setShowLoggerId( boolean selected ) → void

### Parameters

selected - a boolean

### Returns:

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

## setShowOnlyHighlited

setShowOnlyHighlited( boolean showOnlyHighlited ) → void

### Parameters

showOnlyHighlited - a boolean

### Returns:

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

## setShowThreads

setShowThreads( boolean selected ) → void

### Parameters

selected - a boolean

### Returns:

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

## setShowTimeStamps

setShowTimeStamps( boolean selected ) → void

### Parameters

selected - a boolean

### Returns:

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

## 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]