| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
9年前发布

带markdown支持的调试功能:logdown

Logdown是一个调试功能,可运行于浏览器和服务器中。支持Markdown。它没有任何依赖只有2k gzip压缩之后。

示例: example page or in the preview below.

Preview

Browser

Server

Using

The simplest use of the library in both platforms could be done as follows:

// In the browser var logger = new Logdown({prefix: 'foo'})

If on the server, install it through npm:

npm install --save logdown

And then use it.

// In the server-side or client-side with Browserify  var Logdown = require('logdown')  var logger = new Logdown({prefix: 'foo'})

It is highly recommended to use a prefix for your instance, this way you get a nice prefixed message on console and it is possible to silence instances based on the prefix name, as we will see after.

After creating your object, you can use the regularlog,warn,infoanderrormethods as we have onconsole, but now with Markdown support.

logger.log('lorem *ipsum*')  logger.info('dolor _sit_ amet')  logger.warn('consectetur `adipiscing` elit')

项目主页:http://www.open-open.com/lib/view/home/1426837657132

 本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1426837657132.html
logdown 程序调试