Debugging Structr-UI

Search
Feedback

Structr-UI offers a debug mode which logs lots of information. There are two modes:

  1. In-Page logging
    This mode adds a HTML debug element in the footer area which is used to display all log messages.
  2. console-based logging
    This mode prints all log messages to the browser console.

Usage

The Logger can be activated via URL parameter or via JavaScript.

  • URL Parameter: http://localhost:8082/structr?debug=<mode>&events=<subscriptions>
  • JavaScript: _Logger.initLogger(mode, subscriptions);
    In JavaScript the subscriptions parameter takes a comma-separated string (e.g. INIT,PAGES) or a JavaScript array (e.g. ["INIT", "PAGES"])

Note: If no subscriptions are passed the logger subscribes to every event.

The logger can be adjusted at runtime. It can subscribe to another log event via _Logger.subscribeToLogEvent("INIT") or unsubscribe from a log event via _Logger.unsubscribeFromLogEvent("INIT").

Modes

Mode parameter value
In-Page logging page or true or 1
console-based logging console or 2

Any other kind of parameter value will disable logging.

Event Subscriptions

The subscriptions are passed as a comma-separated list. The values in the following list are supported.

Note: If the logger is subscribed to the “WS” event then every event prefixed with “WS.” is logged.

CONTENTS
CRUD
DND
ELEMENTS
ENTITIES
FILES
FILESYSTEM
GRAPH
INIT
MODEL
PAGER
PAGES
SCHEMA
SECURTIY
WIDGETS
WS
WS.ADD
WS.APPEND_CHILD
WS.APPEND_FILE
WS.APPEND_USER
WS.APPEND_WIDGET
WS.AUTOCOMPLETE
WS.CHILDREN
WS.CHUNK
WS.CLONE_COMPONENT
WS.CLONE_NODE
WS.CLONE_PAGE
WS.CREATE
WS.CREATE_AND_APPEND_DOM_NODE
WS.CREATE_COMPONENT
WS.CREATE_DOM_NODE
WS.CREATE_LOCAL_WIDGET
WS.CREATE_RELATIONSHIP
WS.CREATE_SIMPLE_PAGE
WS.DELETE
WS.DELETE_RELATIONSHIP
WS.DELETE_UNATTACHED_NODES
WS.DOM_NODE_CHILDREN
WS.GET
WS.GET_BY_TYPE
WS.GET_LOCAL_STORAGE
WS.GET_PROPERTY
WS.GET_RELATIONSHIP
WS.GET_SCHEMA_INFO
WS.GET_TYPE_INFO
WS.IMPORT
WS.INSERT_BEFORE
WS.LINK
WS.LIST
WS.LIST_ACTIVE_ELEMENTS
WS.LIST_COMPONENTS
WS.LIST_SCHEMA_PROPERTIES
WS.LIST_SYNCABLES
WS.LIST_UNATTACHED_NODES
WS.LOGIN
WS.LOGOUT
WS.PATCH
WS.PING
WS.PULL
WS.PUSH
WS.PUSH_SCHEMA
WS.QUERY
WS.REMOVE
WS.REMOVE_FROM_COLLECTION
WS.REPLACE_WIDGET
WS.SAVE_LOCAL_STORAGE
WS.SAVE_NODE
WS.SEARCH
WS.SET_PERMISSION
WS.SNAPSHOTS
WS.STATUS
WS.SYNC_MODE
WS.UNARCHIVE
WS.UPDATE
WS.UPLOAD
WS.WRAP_CONTENT

Graph-Browser

About this article
Last change 2016-08-29
Topics