Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Dec 17, 2014
1 parent e069f86 commit 758fca1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# intel ChangeLog

## Current dev
## v1.0.0 - 2014-12-17

- added `intel.console({ logger: str })` to specify a parent logger
- added `record.v` to indicate log record format
Expand All @@ -15,7 +15,7 @@
- changed JSON format of `Record` to not include interpolated `message`, since it already contains `args`
- changed Record.timestamp to use Date.now() instead of new Date()
- removed `Promise`s being returned from log methods. Not useful, slows it down.
- removed `Rotating` handler from core. Use `intel-rotating` on npm.
- removed `Rotating` handler from core. Use [logrotate-stream](https://npmjs.org/package/logrotate-stream) or similar.
- performance **HUGE BOOST ACROSS THE BOARD**

## v0.5.2 - 2014-02-19
Expand Down
20 changes: 2 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ An abbreviation of intelligence. In this case, the acquirement of information.
- hierarchial named loggers
- powerful config
- console injection works with all libraries
- fast where possible

## Table of Contents

Expand All @@ -27,7 +28,6 @@ An abbreviation of intelligence. In this case, the acquirement of information.
- [ConsoleHandler](#consolehandler)
- [StreamHandler](#streamhandler)
- [FileHandler](#filehandler)
- [RotatingFileHandler](#rotatingfilehandler)
- [NullHandler](#nullhandler)
- [Creating a Custom Handler](#creating-a-custom-handler)
- [Filters](#filters)
Expand Down Expand Up @@ -189,19 +189,6 @@ The File handler will write messages to a file on disk. It extends the [Stream](

As a shortcut, you can pass the `file` String directly to the constructor, and all other options will just use default values.

### RotatingFileHandler

```js
new intel.handlers.Rotating(options);
```

The Rotating handler extends the [File](#filehandler) handler, making sure log files don't go over a specified size.

- **maxSize** - A number of bytes to restrict the size of log files.
- **maxFiles** - A number of log files to create after the size restriction is met.

As files reach the max size, the files will get moved to a the same name, with a number attached to the end. So, `intel.log` will become `intel.log.1`, and `intel.log.1` would move to `intel.log.2`, up to the maxFiles number.

### NullHandler

```js
Expand All @@ -225,14 +212,11 @@ function CustomHandler(options) {
// don't forget to inhert from Handler (or a subclass, like Stream)
util.inherits(CustomHandler, intel.Handler);

CustomHandler.prototype.emit = function customEmit(record, callback) {
CustomHandler.prototype.emit = function customEmit(record) {
// do whatever you need to with the log record
// this could be storing it in a db, or sending an email, or sending an HTTP request...
// if you want the message formatted:
// str = this.format(record);

// The callback should be called indicating whether there was an error or not.
callback(err);
}
```

Expand Down

0 comments on commit 758fca1

Please sign in to comment.