Skip to content

Commit

Permalink
2.0.0-beta.2: API improvements
Browse files Browse the repository at this point in the history
* Loggers are functions now. Supports debug-style API
* Logger function defaults to level DEBUG
* Logger function accepts a level name as first parameter
* Added aliases 'verbose' and 'silly' for levels 'log' and 'trace', respectively
* Ulog now supports hooks for logger extension and formatters
* Ulog should now be a drop-in replacement for [debug](https://npmjs.com/package/debug)

New in beta.2: In node version, file descriptor is exposed on console.fd so it can
be used in extensions.

## Backward compatible
v2 Should be a backward-compatible release. But possibly some (very) old browsers are no longer supported
because of the use of Function.prototype.name. Tested on Internet Explorer 11, Edge 41, Opera 49, Chrome 63.
Please test before upgrading and report any issues in the [issue tracker](https://github.com/download/ulog/issues).
Not tested in Safari because I do not have access to a Mac. Help in testing welcome!
  • Loading branch information
Download committed Dec 27, 2017
1 parent 17c92ed commit 9594f7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ulog <sub><sup>v2.0.0-beta.1</sup></sub>
# ulog <sub><sup>v2.0.0-beta.2</sup></sub>
### Microscopically small universal logging library

[![npm](https://img.shields.io/npm/v/ulog.svg)](https://npmjs.com/package/ulog)
Expand All @@ -19,8 +19,8 @@ Even with these extra features, ulog is still **very** small, weighing
in just over 1 kB minified and gzipped.

## Download
* [ulog.umd.js](https://cdn.rawgit.com/download/ulog/2.0.0-beta.1/ulog.umd.js) (~3kB, source)
* [ulog.min.js](https://cdn.rawgit.com/download/ulog/2.0.0-beta.1/ulog.min.js) (~2kB, minified)
* [ulog.umd.js](https://cdn.rawgit.com/download/ulog/2.0.0-beta.2/ulog.umd.js) (~3kB, source)
* [ulog.min.js](https://cdn.rawgit.com/download/ulog/2.0.0-beta.2/ulog.min.js) (~2kB, minified)

## Install
```sh
Expand Down Expand Up @@ -55,7 +55,7 @@ define(['ulog'], function(ulog){

### Script tag
```html
<script src="https://cdn.rawgit.com/download/ulog/2.0.0-beta.1/ulog.min.js"></script>
<script src="https://cdn.rawgit.com/download/ulog/2.0.0-beta.2/ulog.min.js"></script>
```

## Logging methods
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ulog",
"version": "2.0.0-beta.1",
"version": "2.0.0-beta.2",
"description": "Microscopically small universal logging library",
"main": "node.js",
"unpkg": "ulog.min.js",
Expand Down

0 comments on commit 9594f7a

Please sign in to comment.