Skip to content

Commit

Permalink
Bump to v1.4.0 (#56)
Browse files Browse the repository at this point in the history
* Bump to v1.4.0

* Fixup readme

* Fix Typo in README (#43)

* Change URL to use rawgit.com, fixes #33

* Update Changelog
  • Loading branch information
jonnyreeves authored Aug 18, 2017
1 parent e9824f0 commit 34dcd12
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 1.4.0 (18th August, 2017)
- Add `Logger.getLevel()` (#49, @BenjaminVadant)
- Invoke `console.debug` if present (#34, @ajwagner777)
- Add Typing for `Logger.createDefaultHandler()` (#55, @scevallos)
- Fix typo in README (#43, @gamtiq)
- Update README to reference rawgit.com (#33, @tjenkinson)

## 1.3.0 (5th July, 2016)
- Add `Logger.createDefaultHandler()`, fixes #26
- Correct typo in README, fixes #28
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
js-Logger has zero dependencies and comes with AMD and CommonJS module boilerplate. If the last sentence meant nothing to you then just lob the following into your page:

```html
<script src="https://raw.github.com/jonnyreeves/js-logger/master/src/logger.min.js"></script>
<script src="https://cdn.rawgit.com/jonnyreeves/js-logger/master/src/logger.min.js"></script>
```

Have a look at [babel-plugin-js-logger](https://github.com/core-process/babel-plugin-js-logger), in case your project utilizes [Babel](https://babeljs.io/), and you want to use js-Logger throughout your entire project efficiently.
Expand Down Expand Up @@ -44,14 +44,13 @@ var oldLevel = Logger.getLevel();
Logger.setLevel(Logger.OFF);
Logger.error("Hull breach on decks 5 through to 41!"); // ...

// Some time later

// Actually, maybe those logs were quite useful...
Logger.setLevel(oldLevel);

```

## Log Handler Functions
All log messages are routed through a handler function which redirects filtered messages somewhere. You can configure the handler function via `Logger.setHandler` nothing that the supplied function expects two arguments; the first being the log messages to output and the latter being a context object which can be inspected by the log handler.
All log messages are routed through a handler function which redirects filtered messages somewhere. You can configure the handler function via `Logger.setHandler` noting that the supplied function expects two arguments; the first being the log messages to output and the latter being a context object which can be inspected by the log handler.

```js
Logger.setHandler(function (messages, context) {
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": "js-logger",
"version": "1.3.0",
"version": "1.4.0",
"description": "Lightweight, unobtrusive, configurable JavaScript logger",
"author": "Jonny Reeves (http://jonnyreeves.co.uk)",
"homepage": "http://github.com/jonnyreeves/js-logger",
Expand Down

0 comments on commit 34dcd12

Please sign in to comment.