Provides Plugin.ConsoleFilters plugin class.
This plugin adds the ability to control which Console entries display by filtering on category and source. Two groups of checkboxes are added to the Console footer, one for categories and the other for sources. Only those messages that match a checked category or source are displayed.
protected {Number}
protected Array
static String
protected static Object
static String
static String
static String
protected
void
_afterCacheLimitChange
(
e
)
e
<Event>
the attribute change event object
protected
void
_afterCategoryChange
(
e
)
e
<Event>
the attribute change event object
protected
void
_afterClearConsole
(
)
protected
void
_afterSourceChange
(
e
)
e
<Event>
the attribute change event object
protected
void
_createCheckbox
(
container
,
name
)
container
<Node>
the parentNode of the new checkbox and label
name
<String>
the identifier of the filter
protected
void
_filterBuffer
(
)
protected
void
_onCategoryCheckboxClick
(
e
)
e
<Event>
the DOM event
protected
void
_onEntry
(
e
)
e
<Event>
the custom event object
protected
void
_onSourceCheckboxClick
(
e
)
e
<Event>
the DOM event
protected
Number
_setCacheLimit
(
v
)
v
<Number>
Maximum number of entries
protected
void
_uiSetCheckbox
(
type
,
item
,
checked
)
type
<String>
'category' or 'source'
item
<String>
the name of the filter (e.g. 'info', 'event')
checked
<Boolean>
value to set the checkbox's checked property
protected
_validateCategory
(
cat
,
v
)
cat
<String>
the new category:visibility map
v
<String>
the subattribute path updated
protected
_validateSource
(
cat
,
v
)
cat
<String>
the new source:visibility map
v
<String>
the subattribute path updated
protected
void
bindUI
(
)
void
hideCategory
(
cat*
)
cat*
<String>
1..n categories to filter out of the UI
void
hideSource
(
src*
)
src*
<String>
1..n sources to filter out of the UI
protected
void
initializer
(
)
void
refreshConsole
(
)
protected
void
renderUI
(
)
void
showCategory
(
cat*
)
cat*
<String>
1..n categories to allow to display in the UI
void
showSource
(
src*
)
src*
<String>
1..n sources to allow to display in the UI
cacheLimitChange
(
event
)
event
<Event.Facade>
An Event Facade object with the following attribute specific properties added:
categoryChange
(
event
)
event
<Event.Facade>
An Event Facade object with the following attribute specific properties added:
defaultVisibilityChange
(
event
)
event
<Event.Facade>
An Event Facade object with the following attribute specific properties added:
sourceChange
(
event
)
event
<Event.Facade>
An Event Facade object with the following attribute specific properties added: - {Number}
- Object
Map of entry categories to their visibility status. Update a particular category's visibility by setting the subattribute to true (visible) or false (hidden).
For example, yconsole.filter.set('category.info', false) to hide log entries with the category/logLevel of 'info'.
Similarly, yconsole.filter.get('category.warn') will return a boolean indicating whether that category is currently being included in the UI.
Unlike the YUI instance configuration's logInclude and logExclude properties, filtered entries are only hidden from the UI, but can be made visible again.
- {Boolean}
- Object
Map of entry sources to their visibility status. Update a particular sources's visibility by setting the subattribute to true (visible) or false (hidden).
For example, yconsole.filter.set('sources.slider', false) to hide log entries originating from Y.Slider.