XOTcl - Documentation -- ./../library/lib/trace.xotcl

# ./../library/lib/trace.xotcl

## Package/File Information

Package provided: xotcl::trace 0.91
Defined Objects/Classes:

- Object: lintFilter, showCall, showClass, showMsg, showStack, showTimeEnd, showTimeStart, showVars, statFilter, traceFilter.
- Trace: closeTraceFile, openTraceFile, puts.

Filename: ./../library/lib/trace.xotcl

Description: | Various tracing tools for the XOTcl language.

## Class: Object

Procs/Instprocs: lintFilter, showCall, showClass, showMsg, showStack, showTimeEnd, showTimeStart, showVars, statFilter, traceFilter.

### Instprocs

- traceFilter args

  Arguments: | args: arbitrary args
  Description: | Filter to trace every method call on an object or class hierarchy. Outputs a message befora and after each call of the traced object.
  Return: | empty string

- lintFilter

  Description: | Experimental lint filter

- statFilter

  Description: | Experimental statistics filter

- showVars args

  Arguments: | args: ist of variables
  Description: | Show the values of the specified variables (or of all variables) of an object on stderr.

- showMsg msg

  Arguments: | msg: optional output
  Description: | Show a message msg with the form "[self] $cls->$method $msg" on stderr.

- showClass

  Description: | Show classes and mixins of the object

- showStack maxDepth

  Arguments: | maxDepth: max stack depth, default=100
  Description: | Show callstack up to the specified calldepth.

- showCall

  Description: | Show the current call with the form "[self] $cls->$method $args" on stderr.

- showTimeStart ?handle?

  Arguments: | ?handle?: Handle object name, optional
  Description: | start a timer

- showTimeEnd ?handle?

  Arguments: | ?handle?: Handle object name, optional
  Description: | end a timer and show result

## Object: Trace

Class: Object
Procs closeTraceFile, openTraceFile, puts.

Description: | Write trace outputs and produce statistics. Variable traceStream defines where to write trace output (default: stderr).

### Procs

- puts line

  Arguments: | line: output line
  Description: | Define how traceFilter writes to the output stream. Default: write to trace stream.

- openTraceFile name

  Arguments: | name: file name
  Description: | Redirect trace output to file.

- closeTraceFile name

  Arguments: | name: file name
  Description: | Close trace file and redirect output to stderr.

Back to index page.