a Simple & Beautiful Logging for Browser
- Super Lightweight (<2kb)
- Colorful.
- Font size customize.
- Timestamp.
- Log levels: trace, debug, info, warn, error.
- Silent mode. (for production)
- Limit logs by level.
Download dlog.js here
<script src="dlog.min.js"></script>
bower install dlog
component install ddo/dlog
var log = new dlog();
- trace
- debug
- info
- warn
- error
- silent
var log = new dlog({
name: "App Name",
size: 20, //font size
level: "info"
});
log.log('info', data);
log.log('debug', data]);
...
log.trace(data);
log.warn(data);
log.error(data);
...
- Default: 14px
- Set font size
log.setSize(19);
- Default: "DLOG"
- Set App name, you may have many apps to log.
log.setName("App Name");
- Default: "info"
- Set logging level to limit the showing log.
- For example, if logging level is "info" then all the "trace" and "debug" level logs will not be showed.
- Set level to "silent" to stop all log. (good for production)
log.setLevel("silent");
Nothing !!!
Table will show if data is a array of objects
- Customize level.
- Color Setting.
- Log format templates.
MIT © Ddo