4
<title>Test Page</title>
5
<link type="text/css" rel="stylesheet" href="../../../build/console/assets/skins/sam/console-filters.css">
6
<style type="text/css">
12
<body class="yui3-skin-sam">
15
<input type="button" id="foo" value="Log foo msg">
16
<input type="button" id="info" value="Log info msg">
17
<input type="button" id="warn" value="Log warn msg">
18
<input type="button" id="error" value="Log error msg">
19
<button type="button" id="hide">Hide</button>
20
<button type="button" id="show">Show</button>
21
<button type="button" id="collapse">Collapse</button>
22
<button type="button" id="expand">Expand</button>
23
<button type="button" id="destroy">Destroy</button>
24
<button type="button" id="throttle">Throttle</button>
25
<button type="button" id="limit">Limit cache</button>
28
<script type="text/javascript" src="../../../build/yui/yui.js"></script>
29
<script type="text/javascript">
31
//useBrowserConsole:false,
34
//logInclude : { global: true },
35
//logExclude : { attribute: true },
38
'console-filters': 'debug'
40
base: '../../../build/'
41
}).use('console','console-filters', function (Y) {
50
Y.on('click',function (e) { Y.log('FOO message '+(++x.foo),'foo'); },'#foo');
51
Y.on('click',function (e) { Y.log('INFO message long message that should trigger scroll bars '+(++x.info)); },'#info');
52
Y.on('click',function (e) { Y.log('WARN message '+(++x.warn),'warn'); },'#warn');
53
Y.on('click',function (e) { Y.log('ERROR message '+(++x.error),'error'); },'#error');
54
Y.one('#hide').on('click', function () { yconsole.hide(); });
55
Y.one('#show').on('click', function () { yconsole.show(); });
56
Y.one('#collapse').on('click', function () { yconsole.collapse(); });
57
Y.one('#expand').on('click', function () { yconsole.expand(); });
58
Y.one('#destroy').on('click', function () { yconsole.destroy(); });
59
Y.one('#throttle').on('click', function () {
60
for (var i = 0; i < 500; ++i) {
61
Y.log('Throttle message ' + i);
64
Y.one('#limit').on('click', function () {
65
yconsole.filter.set('cacheLimit', 500);
68
var yconsole = new Y.Console({
69
//useBrowserConsole: true,
78
//yconsole.plug(Y.Plugin.ConsoleFilters);
83
//Y.log('testing known category','info');
84
Y.log('Using a custom source and category','note','my-app');
85
Y.log('Standard info message');
86
Y.log('This is a warning','warn','attribute');
87
Y.log('This is an error','error','event');
88
//Y.log('testing known source','info','global');
89
//Y.log('testing new source','info','bar');
90
//yconsole.log("Test from the console object",'info','Console');
91
//Y.log('testing warn','warn');
92
//Y.log('testing long warn that will take up multiple lines in the console','warn');
93
//Y.log('testing error','error');
94
//Y.log('testing long error that will take up multiple lines in the console','error');