- Debug
- Warning
- Error
- Info
VisorLog also supports the dumping of objects to the logger.
To use VisorLog, first include the javascript file in the head of your document.
<script src="http://blog.crspy.net/wp-admin/visor/visor.js"></script>
Once the file is included the VisorLog will be generated once the onload event has fired for the page. After that point, you’re free to log using the following method
VISOR.logger.log( type, message, [object]);
The first parameter, type, specifies which of the four types mentioned above will be used for the given message. The second parameter, message, is the string you wish to be sent to the log. The third parameter, object, is an optional object which will be dumped to the log and will be associated with the given message.
If you want, you can bind the VISOR.logger object to something shorter like _v to make things look a little cleaner:
var _v = VISOR.logger; _v.log('debug', 'this is a debug message');
The VisorLog also has a keyboard shortcut to toggle the VisorLog in and out of view. To do this, press Shift+v.
To see the VisorLog in action, click here
To download VisorLog, click here (Visor.zip 14.6 KB)
VisorLog is licensed under the Apache License, Version 2.0.
CRSPY.NET » VISOR version 1.0 release:
[…] more information about VisorLog, check out it’s project page. This entry was written by podman and posted on August 25, 2007 at 12:32 am and filed under […]
Posted on August 25th, 2007 at 12:32 am