# Logger Widget :: Reading Logs

### Default LogReader Example

With just a few lines of code, you can put a LogReader on any web page to display log messages built into the YUI Library or custom log messages that you write into your own code. The LogReader will look for the YUI Library's Drag and Drop utility to make the LogReader automatically draggable.

(not supported in Opera, Safari)

Hide All LogReaders || Show All LogReaders

Enable Output to console.log() || Disable Output to console.log()

Reset Logger stack

### Sample Code

<head> <style type="text/css"> /* A style was defined for a custom category. By convention, it is defined with narrow-scope selectors to achieve namespacing*/ .yui-log .mytype {background-color:#FF99CC;} </style> </head> <body> <!-- No custom markup was defined --> <script type="text/javascript"> // A single line of JavaScript can get you up and logging myLogReader1 = new YAHOO.widget.LogReader(); // A couple configurations make for quick customization myLogReader2 = new YAHOO.widget.LogReader(); myLogReader2.compactOutput = true; myLogReader2.newestOnTop = false; myLogReader2.setTitle("Logger Console: Oldest > on > Top!"); </script> </body>