File 'gui/logger.cls' (part of 'Pool_GuiBase')

Description (short)
Log widget
Written by
Andreas Kupries
Description
Logger based upon modified text widget. Suitable for usage in conjunction with ::pool::syslog::syslog.
Keywords
syslog, log widget

Class 'logger'

Superclasses
widget
Options
slow
level
theight
twidth
Methods
public
TrackTHeight (o oldv)
TrackTWidth (o oldv)
clear ()
createSubwidgets ()
levelcolor (level color)
log (level text)
logger ()
Membervariables
public
lcolor

Options

-slow
Boolean flag. If set this widget will cause an update cycle of the display after each message added and displayed.
default value: 0
-level
The lowest level a message must have to be displayed by this widget
default value: debug
-theight
Width to be requested by the internal text-widget.
default value: 10
-twidth
Width to be requested by the internal text-widget.
default value: 80

Methods

TrackTHeight (o oldv)

Configure procedure. Propagates changes to the height of the widget into the display.
Argument: o The changed option.
Argument: oldv The old value of the option.

TrackTWidth (o oldv)

Configure procedure. Propagates changes to the width of the widget into the display.
Argument: o The changed option.
Argument: oldv The old value of the option.

clear ()

Clear log

createSubwidgets ()

Overrides widget:createSubwidgets
Create and pack the internally used widgets (text, scrollbar)

levelcolor (level color)

Changes the color used to display messages of level. Affects all messages, even already added ones.
Argument: level The name of the level to change the color for.
Argument: color The new color to use.

log (level text)

Adds text to log, under the given level. Ignores all messages with a level below level.
Argument: level Message level, used as tag.
Argument: text Text to log

logger ()

Constructor. Reads the level colors from the syslog facility of Pool, see base/syslog.tcl, to allow changes without affecting the defaults.


Membervariables

lcolor
Array mapping from level names to the colors used as background for the messages of this level.

Generated by AutoDoc 2.4 at 09/14/2000, invoked by Andreas Kupries