basic.html revision 8e66dcad24a2cc4d23e84ee786f0ccacee1f2aad
0N/A<!doctype html>
2362N/A<html>
0N/A<head>
0N/A <title>Test Page</title>
0N/A <link type="text/css" rel="stylesheet" href="/build/console/assets/skins/sam/console-filters.css">
0N/A <style type="text/css">
2362N/A#c {
0N/A margin-bottom: 1em;
2362N/A}
0N/A </style>
0N/A</head>
0N/A<body class="yui3-skin-sam">
0N/A<div class="markup">
0N/A <div id="c"></div>
0N/A <input type="button" id="foo" value="Log foo msg">
0N/A <input type="button" id="info" value="Log info msg">
0N/A <input type="button" id="warn" value="Log warn msg">
0N/A <input type="button" id="error" value="Log error msg">
0N/A <button type="button" id="hide">Hide</button>
0N/A <button type="button" id="show">Show</button>
2362N/A <button type="button" id="collapse">Collapse</button>
2362N/A <button type="button" id="expand">Expand</button>
2362N/A <button type="button" id="destroy">Destroy</button>
0N/A <button type="button" id="throttle">Throttle</button>
0N/A <button type="button" id="limit">Limit cache</button>
0N/A</div>
0N/A
0N/A<script type="text/javascript" src="/build/yui/yui.js"></script>
0N/A<script type="text/javascript">
0N/AYUI({
0N/A //useBrowserConsole:false,
0N/A //logLevel: 'warn',
0N/A //filter: 'debug',
0N/A //logInclude : { global: true },
0N/A //logExclude : { attribute: true },
0N/A filters : {
0N/A console: 'raw',
0N/A 'console-filters': 'debug'
0N/A },
0N/A base: '/build/'
0N/A}).use('console','console-filters', function (Y) {
0N/A
0N/Avar x = {
896N/A foo : 0,
0N/A info : 0,
0N/A warn : 0,
896N/A error : 0
896N/A};
896N/A
896N/AY.on('click',function (e) { Y.log('FOO message '+(++x.foo),'foo'); },'#foo');
896N/AY.on('click',function (e) { Y.log('INFO message long message that should trigger scroll bars '+(++x.info)); },'#info');
896N/AY.on('click',function (e) { Y.log('WARN message '+(++x.warn),'warn'); },'#warn');
0N/AY.on('click',function (e) { Y.log('ERROR message '+(++x.error),'error'); },'#error');
0N/AY.one('#hide').on('click', function () { yconsole.hide(); });
896N/AY.one('#show').on('click', function () { yconsole.show(); });
896N/AY.one('#collapse').on('click', function () { yconsole.collapse(); });
896N/AY.one('#expand').on('click', function () { yconsole.expand(); });
896N/AY.one('#destroy').on('click', function () { yconsole.destroy(); });
896N/AY.one('#throttle').on('click', function () {
896N/A for (var i = 0; i < 500; ++i) {
896N/A Y.log('Throttle message ' + i);
896N/A }
0N/A});
0N/AY.one('#limit').on('click', function () {
0N/A yconsole.filter.set('cacheLimit', 500);
896N/A});
0N/A
896N/Avar yconsole = new Y.Console({
896N/A //useBrowserConsole: true,
896N/A //verbose : true,
896N/A //consoleLimit : 10,
896N/A boundingBox: '#c',
896N/A //style : 'inline',
896N/A logLevel : "Garbage",
896N/A newestOnTop : false
896N/A});
896N/A
896N/A//yconsole.plug(Y.Plugin.ConsoleFilters);
896N/A
0N/Ayconsole.render();
0N/A
0N/A//Y.log('testing');
0N/A//Y.log('testing known category','info');
0N/AY.log('Using a custom source and category','note','my-app');
0N/AY.log('Standard info message');
896N/AY.log('This is a warning','warn','attribute');
896N/AY.log('This is an error','error','event');
0N/A//Y.log('testing known source','info','global');
896N/A//Y.log('testing new source','info','bar');
0N/A//yconsole.log("Test from the console object",'info','Console');
0N/A//Y.log('testing warn','warn');
896N/A//Y.log('testing long warn that will take up multiple lines in the console','warn');
896N/A//Y.log('testing error','error');
896N/A//Y.log('testing long error that will take up multiple lines in the console','error');
896N/A
896N/A});
896N/A</script>
896N/A</body>
0N/A</html>
0N/A