Module: alfresco/logging/DebugLog

alfresco/logging/DebugLog

This module extends SubscriptionLog to provide a version suitable for debugging purposes.
Author:
  • Martin Doyle
License:
Source:

Example

Sample configuration:

{
   name: "alfresco/logging/DebugLog",
   config: {
      payloadConfig: {
         maxDepth: 3,
         maxChildren: 10,
         excludedKeys: ["foo", "bar"]
      }
   }
}

Extends

  • external:alfresco/logging/SubscriptionLog

Members

<static> defaultPayloadConfig :payloadConfig

Default payload configuration values
Type:
Source:

_entries :Object[]

The log entry nodes
Type:
  • Object[]
Default Value:
  • null
Source:

_lastExcludeFilter :string

The previous value of the exclude-filter
Type:
  • string
Since:
  • 1.0.50
Default Value:
  • null
Source:

_lastIncludeFilter :string

The previous value of the include-filter
Type:
  • string
Since:
  • 1.0.50
Default Value:
  • null
Source:

cssRequirements :object[]

An array of the CSS files to use with this widget.
Type:
  • object[]
Default Value:
  • [{cssFile:"./css/DebugLog.css"}]
Source:

payloadConfig :payloadConfig

An optional configuration object for controlling payload sanitisation
Type:
Source:

rootClass :string

The root class for this widget
Type:
  • string
Source:

templateString :string

The HTML template to use for the widget.
Type:
  • string
Source:

Methods

_applyFilter(filters, entry)

Set the visibility of the supplied log entry given the current filters
Parameters:
Name Type Description
filters object The filters information
Properties
Name Type Description
include string The value of the include-filter input
exclude string The value of the exclude-filter input
includeRegex string Whether the include-filter is a regular-expression
excludeRegex string Whether the include-filter is a regular-expression
entry object The log entry
Source:

_applyFilters(force)

Apply the include and exclude filters to the log. Filter values are either comma-separated strings or a regular expression, as determined by the state of the regular expression "checkbox".
Parameters:
Name Type Argument Default Description
force boolean <optional>
false Whether to force applying the current filters
Since:
  • 1.0.50
Source:

_clearFilters()

Clear the exclude filter
Since:
  • 1.0.51
Source:

_matchesFilter(testString, filter) → {boolean}

Apply the filter value to the test string and return match status
Parameters:
Name Type Description
testString string The text to match against
filter string The filter to apply
Since:
  • 1.0.50
Source:
Returns:
Whether the filter matches the test string
Type
boolean

_onClearButtonClick()

Clear the log
Source:

_onEntryClick(dataNode, evt)

Handle clicks on the log entry
Parameters:
Name Type Description
dataNode Object The dataNode, if present
evt Object Dojo-normalised event object
Source:

_onWidgetClick(evt)

This top-level click handler is to prevent click events on the log bubbling back up to the document.
Parameters:
Name Type Description
evt Event Dojo-normalised event object
Since:
  • 1.0.61
Source:

_sanitiseData(data) → {object}

Given a variable, make it safe for being JSON.stringified. This means avoiding circular references and respecting maximum sibling quantity and maximum depth.
Parameters:
Name Type Description
data object The data to make safe
Source:
Returns:
The safe data (or the original data, if it was falsy)
Type
object

_splitFilters(filterString) → {string[]}

Split the terms in a filter string to create an array of filter values. Terms are comma-separated. To include a comma in a search term, double it up (use ,,) and it will be converted into a single comma after the terms have been split.
Parameters:
Name Type Description
filterString string The filter string
Since:
  • 1.0.50
Source:
Returns:
The filter values
Type
string[]

constructor()

The constructor
Source:

postMixInProperties()

Called after properties have been mixed into widget
Source:

updateLog(logData)

Update the log with a new log item
Parameters:
Name Type Description
logData object The details of the publication
Source: