Skip to content
Martin Wendt edited this page Feb 10, 2019 · 5 revisions

About Fancytree debug logger extension.

Add configurable logging and timings to extension hooks and events.

Note: This should not be included in production code, since it affects performance.

Note: This extension must be included as last item of the extension option.

Options

  • logTarget, type: {jQuery}, default: null
    NOT YET IMPLEMENTED! Write output to div tag instead of console.
  • timings, type: {bool | Array}, default: false
    Add timings to output.
  • traceEvents, type: {bool | Array}, default: true
    Enable logging of node or tree events.
  • traceHooks, type: {bool | Array}, default: false
    Enable logging of extension hooks.
  • traceUnhandledEvents, type: {bool}, default: false
    If false, dump only events that are implemented in the current tree options.

Events

n.a.

Methods

n.a.

Example

In addition to jQuery, jQuery UI, and Fancytree, include jquery.fancytree.logger.js:

  <script src="//code.jquery.com/jquery-3.3.1.min.js"></script>

  <link href="skin-win8/ui.fancytree.css" rel="stylesheet">
  <script src="js/jquery-ui-dependencies/jquery.fancytree.ui-deps.js"></script>
  <script src="js/jquery.fancytree.js"></script>
  <script src="js/jquery.fancytree.logger.js"></script>
$("#tree").fancytree({
  extensions: ["logger"],
  logger: {
    traceEvents: true,
    traceHooks: ["treeCreate", "treeInit"],
    timings: true
  },
  ...
});

Recipes

[Howto] ...
Clone this wiki locally