# Logger Widget :: Customizing LogReader

### Customized LogReader Example

These LogReaders have been customized, not only by modifying the default CSS, but also, the `verboseOutput` properties have been disabled, and the log messages of the first LogReader have been formatted with a custom `formatMsg` method.

(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"> /* container is relatively positioned and font size is adjusted here (default is 77%) */ #yui-log {position:relative;font-size:85%;} /* width is controlled here: default 31em */ .yui-log {padding:1em;width:31em;background-color:#AAA;border:1px solid black;font-family:monospace;z-index:9000;} .yui-log p {margin:1px;padding:.1em;} .yui-log button {font-family:monospace;} .yui-log .yui-log-hd {position:relative;margin-top:1em;padding:.5em;background-color:#575757;color:#FFF;} /* height is controlled here: default 20em*/ .yui-log .yui-log-bd {position:relative;background-color:#FFF;border:1px solid gray;overflow:auto;width:100%;height:10em;} .yui-log .yui-log-ft {position:relative;margin-top:.5em;margin-bottom:1em;} .yui-log .yui-log-btns {position:relative;float:right;bottom:.25em;} .yui-log .info {background-color:#A7CC25;} /* A7CC25 green */ .yui-log .warn {background-color:#F58516;} /* F58516 orange */ .yui-log .error {background-color:#E32F0B;} /* E32F0B red */ .yui-log .time {background-color:#A6C9D7;} /* A6C9D7 blue */ .yui-log .window {background-color:#F2E886;} /* F2E886 tan */ /* a style for a custom category */ .yui-log .mytype {background-color:#FF99CC;} /* FF99CC pink */ </style> </head> <body> <!-- Logger begins --> <div id="yui-log" class="yui-log"></div> <!-- Logger ends --> <script type="text/javascript"> myLogReader1 = new YAHOO.widget.LogReader("yui-log",{verboseOutput: false}); myLogReader1.formatMsg = function(oLogMsg) { var category = oLogMsg.category; return "<p><span class='"+category+"'>"+category+"</span> "+ this.html2Text(oLogMsg.msg)+"</p>"; }; myLogReader2 = new YAHOO.widget.LogReader("yui-log",{verboseOutput: false}); </script> </body>