Package nMOLDYN :: Package Core :: Module Logger :: Class LogToGUI |
[hide private]
[frames] | no frames]

# Class LogToGUI

source code

    logging.Filterer --+
                       |
         logging.Handler --+
                           |
                          LogToGUI

Sets up a GUI handler for the nMOLDYN logger.

Emits the logging messages to a Tk dialog.

Instance Methods | [hide private]
__init__(self) The constructor. | source code
emit(self, record) Emits the logging message in a tkMessageBox. | source code
Inherited from `logging.Handler`: `acquire`, `close`, `createLock`, `flush`, `format`, `handle`, `handleError`, `release`, `setFormatter`, `setLevel` Inherited from `logging.Filterer`: `addFilter`, `filter`, `removeFilter`

Method Details | [hide private]

### __init__(self) (Constructor) | source code
The constructor. Sets the logger. Overrides: logging.Filterer.__init__

### emit(self, record) | source code
Emits the logging message in a tkMessageBox. Parameters: `record` (instance of LogRecord class.) - the logging message. Overrides: logging.Handler.emit Note: the tkMessageBox called will depend on the logging level. tkMessageBox.showerror for 'ERROR' and 'CRITICAL' logging levels. tkMessageBox.showwarning for 'WARNING' logging level. tkMessageBox.showinfo for other logging levels.