isomer.debugger module

Module: Debugger

Debugger overlord

class CLI(*args)[source]

Bases: isomer.component.ConfigurableComponent

Command Line Interface support

This is disabled by default. To enable the command line interface, use either the Configuration frontend, or the iso tool:

iso config enable CLI
__init__(*args)[source]

Check for configuration issues and instantiate a component

cli_help(*args)[source]

Print a list, and a short documentation of all CLI commands

configprops = {}
register_event(event)[source]

Registers a new command line interface event hook as command

stdin_read(data)[source]

read Event (on channel stdin) This is the event handler for read events specifically from the stdin channel. This is triggered each time stdin has data that it has read.

class IsomerDebugger(root=None, *args)[source]

Bases: isomer.component.ConfigurableComponent

Handles various debug requests.

__init__(root=None, *args)[source]

Check for configuration issues and instantiate a component

channel = 'isomer-web'
cli_compgraph(event)[source]

Draw current component graph

cli_errors(*args)[source]

Display errors in the live log

cli_exception_test(*args)[source]

Raise test-exception to check exception handling

cli_locations(*args)[source]

Display all locations of running instance

cli_log_level(*args)[source]

Adjust log level

cli_mem_diff(event)[source]

Output difference in memory usage since last call

cli_mem_growth(*args)[source]

Output data about memory growth

cli_mem_heap(*args)[source]

Output memory heap data

cli_mem_hogs(*args)[source]

Output most memory intense objects

cli_mem_summary(event)[source]

Output memory usage summary

configprops = {'notificationusers': {'default': [], 'description': 'Users that should be notified about exceptions.', 'items': {'type': 'string'}, 'title': 'Notification receivers', 'type': 'array'}}
debug_store_json(event)[source]

A debug-endpoint to store an event as json dump

logtailrequest(event)[source]
exception TestException[source]

Bases: BaseException

Generic exception to test exception monitoring

class cli_comp_graph(*args, **kwargs)[source]

Bases: circuits.core.events.Event

Draw current component graph

class cli_errors(*args, **kwargs)[source]

Bases: circuits.core.events.Event

Display errors in the live log

class cli_exception_test(*args, **kwargs)[source]

Bases: circuits.core.events.Event

Raise test-exception to check exception handling

class cli_help(*args, **kwargs)[source]

Bases: circuits.core.events.Event

Display this command reference

Additional arguments:
-v Add detailed information about hook events in list

command Show complete documentation of a hook command

class cli_locations(*args, **kwargs)[source]

Bases: circuits.core.events.Event

Display all locations of running instance

class cli_log_level(*args, **kwargs)[source]

Bases: circuits.core.events.Event

Adjust log level

Argument:
[int] New logging level (0-100)
class cli_mem_diff(*args, **kwargs)[source]

Bases: circuits.core.events.Event

Output difference in memory usage since last call

class cli_mem_growth(*args, **kwargs)[source]

Bases: circuits.core.events.Event

Output data about memory growth

class cli_mem_heap(*args, **kwargs)[source]

Bases: circuits.core.events.Event

Output memory heap data

class cli_mem_hogs(*args, **kwargs)[source]

Bases: circuits.core.events.Event

Output most memory intense objects

class cli_mem_summary(*args, **kwargs)[source]

Bases: circuits.core.events.Event

Output memory usage summary

class cli_register_event(cmd, thing, *args, **kwargs)[source]

Bases: circuits.core.events.Event

Event to register new command line interface event hooks

__init__(cmd, thing, *args, **kwargs)[source]

An event is a message send to one or more channels. It is eventually dispatched to all components that have handlers for one of the channels and the event type.

All normal arguments and keyword arguments passed to the constructor of an event are passed on to the handler. When declaring a handler, its argument list must therefore match the arguments used for creating the event.

Every event has a name attribute that is used for matching the event with the handlers.

Variables:
  • channels

    an optional attribute that may be set before firing the event. If defined (usually as a class variable), the attribute specifies the channels that the event should be delivered to as a tuple. This overrides the default behavior of sending the event to the firing component’s channel.

    When an event is fired, the value in this attribute is replaced for the instance with the channels that the event is actually sent to. This information may be used e.g. when the event is passed as a parameter to a handler.

  • value – this is a circuits.core.values.Value object that holds the results returned by the handlers invoked for the event.
  • success – if this optional attribute is set to True, an associated event success (original name with “_success” appended) will automatically be fired when all handlers for the event have been invoked successfully.
  • success_channels – the success event is, by default, delivered to same channels as the successfully dispatched event itself. This may be overridden by specifying an alternative list of destinations using this attribute.
  • complete – if this optional attribute is set to True, an associated event complete (original name with “_complete” appended) will automatically be fired when all handlers for the event and all events fired by these handlers (recursively) have been invoked successfully.
  • complete_channels – the complete event is, by default, delivered to same channels as the initially dispatched event itself. This may be overridden by specifying an alternative list of destinations using this attribute.
class clicommand(cmd, cmdargs, *args, **kwargs)[source]

Bases: circuits.core.events.Event

Event to execute previously registered CLI event hooks

__init__(cmd, cmdargs, *args, **kwargs)[source]

An event is a message send to one or more channels. It is eventually dispatched to all components that have handlers for one of the channels and the event type.

All normal arguments and keyword arguments passed to the constructor of an event are passed on to the handler. When declaring a handler, its argument list must therefore match the arguments used for creating the event.

Every event has a name attribute that is used for matching the event with the handlers.

Variables:
  • channels

    an optional attribute that may be set before firing the event. If defined (usually as a class variable), the attribute specifies the channels that the event should be delivered to as a tuple. This overrides the default behavior of sending the event to the firing component’s channel.

    When an event is fired, the value in this attribute is replaced for the instance with the channels that the event is actually sent to. This information may be used e.g. when the event is passed as a parameter to a handler.

  • value – this is a circuits.core.values.Value object that holds the results returned by the handlers invoked for the event.
  • success – if this optional attribute is set to True, an associated event success (original name with “_success” appended) will automatically be fired when all handlers for the event have been invoked successfully.
  • success_channels – the success event is, by default, delivered to same channels as the successfully dispatched event itself. This may be overridden by specifying an alternative list of destinations using this attribute.
  • complete – if this optional attribute is set to True, an associated event complete (original name with “_complete” appended) will automatically be fired when all handlers for the event and all events fired by these handlers (recursively) have been invoked successfully.
  • complete_channels – the complete event is, by default, delivered to same channels as the initially dispatched event itself. This may be overridden by specifying an alternative list of destinations using this attribute.